mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Consistently record contextual types in function expressions.
Removing check that would guard against recording contextual type. The NodeFlags.ContextChecked flag already protects against assigning more than once.
This commit is contained in:
parent
c17a24738c
commit
261ff5b338
@ -4117,16 +4117,12 @@ module ts {
|
||||
for (var i = 0; i < len; i++) {
|
||||
var parameter = signature.parameters[i];
|
||||
var links = getSymbolLinks(parameter);
|
||||
if (!links.type) {
|
||||
links.type = instantiateType(getTypeAtPosition(context, i), mapper);
|
||||
}
|
||||
links.type = instantiateType(getTypeAtPosition(context, i), mapper);
|
||||
}
|
||||
if (signature.hasRestParameter && context.hasRestParameter && signature.parameters.length >= context.parameters.length) {
|
||||
var parameter = signature.parameters[signature.parameters.length - 1];
|
||||
var links = getSymbolLinks(parameter);
|
||||
if (!links.type) {
|
||||
links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper);
|
||||
}
|
||||
links.type = instantiateType(getTypeOfSymbol(context.parameters[context.parameters.length - 1]), mapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user