Merge pull request #1443 from Microsoft/improvedTypeInference

Make initial inferences from parameterless function expressions
This commit is contained in:
Anders Hejlsberg committed 2014-12-17 16:19:49 -08:00
commit b2a02fe9ef
5 files changed
+66 -8

No files matched your search

+1 -1
View File
@@ -3355,7 +3355,7 @@ module ts {
}
function isContextSensitiveFunctionLikeDeclaration(node: FunctionLikeDeclaration) {
return !node.typeParameters && !forEach(node.parameters, p => p.type);
return !node.typeParameters && node.parameters.length && !forEach(node.parameters, p => p.type);
}
function getTypeWithoutConstructors(type: Type): Type {