1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
tests/cases/compiler/letDeclarations-scopes2.ts(8,5): error TS2552: Cannot find name 'local2'. Did you mean 'local'?
tests/cases/compiler/letDeclarations-scopes2.ts(20,5): error TS2552: Cannot find name 'local2'. Did you mean 'local'?
tests/cases/compiler/letDeclarations-scopes2.ts(23,1): error TS2304: Cannot find name 'local'.
tests/cases/compiler/letDeclarations-scopes2.ts(25,1): error TS2304: Cannot find name 'local2'.
==== tests/cases/compiler/letDeclarations-scopes2.ts (4 errors) ====
let global = 0;
{
let local = 0;
local; // OK
global; // OK
local2; // Error
~~~~~~
!!! error TS2552: Cannot find name 'local2'. Did you mean 'local'?
!!! related TS2728 tests/cases/compiler/letDeclarations-scopes2.ts:4:9: 'local' is declared here.
{
let local2 = 0;
local; // OK
global; // OK
local2; // OK
}
local; // OK
global; // OK
local2; // Error
~~~~~~
!!! error TS2552: Cannot find name 'local2'. Did you mean 'local'?
!!! related TS2728 tests/cases/compiler/letDeclarations-scopes2.ts:4:9: 'local' is declared here.
}
local; // Error
~~~~~
!!! error TS2304: Cannot find name 'local'.
global; // OK
local2; // Error
~~~~~~
!!! error TS2304: Cannot find name 'local2'.
|