This is necessary for incremental parsing correctness, as the incremental parser will attempt to reuse these types of nodes in both contexts, and we much ensure it creates the same trees you would get if you were parsing normally.
34 lines
No EOL
1 KiB
Text
34 lines
No EOL
1 KiB
Text
tests/cases/compiler/anonymousModules.ts(1,8): error TS1005: ';' expected.
|
|
tests/cases/compiler/anonymousModules.ts(4,9): error TS1005: ';' expected.
|
|
tests/cases/compiler/anonymousModules.ts(10,9): error TS1005: ';' expected.
|
|
tests/cases/compiler/anonymousModules.ts(1,1): error TS2304: Cannot find name 'module'.
|
|
tests/cases/compiler/anonymousModules.ts(4,2): error TS2304: Cannot find name 'module'.
|
|
tests/cases/compiler/anonymousModules.ts(10,2): error TS2304: Cannot find name 'module'.
|
|
|
|
|
|
==== tests/cases/compiler/anonymousModules.ts (6 errors) ====
|
|
module {
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'module'.
|
|
export var foo = 1;
|
|
|
|
module {
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'module'.
|
|
export var bar = 1;
|
|
}
|
|
|
|
var bar = 2;
|
|
|
|
module {
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'module'.
|
|
var x = bar;
|
|
}
|
|
} |