mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Report error on both declaration and reference when CFA can't determine type
This commit is contained in:
parent
52d2aa5b60
commit
447901367a
@ -9153,6 +9153,7 @@ namespace ts {
|
||||
if (flowType === autoType) {
|
||||
if (compilerOptions.noImplicitAny) {
|
||||
error(declaration.name, Diagnostics.Variable_0_implicitly_has_type_any_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol));
|
||||
error(node, Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(anyType));
|
||||
}
|
||||
return anyType;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user