diff --git a/tests/baselines/reference/classDeclarationBlockScoping1.errors.txt b/tests/baselines/reference/classDeclarationBlockScoping1.errors.txt deleted file mode 100644 index 4f15007bb2a..00000000000 --- a/tests/baselines/reference/classDeclarationBlockScoping1.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/compiler/classDeclarationBlockScoping1.ts(5,11): error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. - - -==== tests/cases/compiler/classDeclarationBlockScoping1.ts (1 errors) ==== - class C { - } - - { - class C { - ~ -!!! error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/classDeclarationBlockScoping1.symbols b/tests/baselines/reference/classDeclarationBlockScoping1.symbols new file mode 100644 index 00000000000..645d327e256 --- /dev/null +++ b/tests/baselines/reference/classDeclarationBlockScoping1.symbols @@ -0,0 +1,10 @@ +=== tests/cases/compiler/classDeclarationBlockScoping1.ts === +class C { +>C : Symbol(C, Decl(classDeclarationBlockScoping1.ts, 0, 0)) +} + +{ + class C { +>C : Symbol(C, Decl(classDeclarationBlockScoping1.ts, 3, 1)) + } +} diff --git a/tests/baselines/reference/classDeclarationBlockScoping1.types b/tests/baselines/reference/classDeclarationBlockScoping1.types new file mode 100644 index 00000000000..9020ca4a23a --- /dev/null +++ b/tests/baselines/reference/classDeclarationBlockScoping1.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/classDeclarationBlockScoping1.ts === +class C { +>C : C +} + +{ + class C { +>C : C + } +} diff --git a/tests/baselines/reference/classDeclarationBlockScoping2.errors.txt b/tests/baselines/reference/classDeclarationBlockScoping2.errors.txt deleted file mode 100644 index 2a9885e110b..00000000000 --- a/tests/baselines/reference/classDeclarationBlockScoping2.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -tests/cases/compiler/classDeclarationBlockScoping2.ts(2,11): error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. -tests/cases/compiler/classDeclarationBlockScoping2.ts(5,15): error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. - - -==== tests/cases/compiler/classDeclarationBlockScoping2.ts (2 errors) ==== - function f() { - class C {} - ~ -!!! error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. - var c1 = C; - { - class C {} - ~ -!!! error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. - var c2 = C; - } - return C === c1; - } \ No newline at end of file diff --git a/tests/baselines/reference/classDeclarationBlockScoping2.symbols b/tests/baselines/reference/classDeclarationBlockScoping2.symbols new file mode 100644 index 00000000000..cece47c3ee7 --- /dev/null +++ b/tests/baselines/reference/classDeclarationBlockScoping2.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/classDeclarationBlockScoping2.ts === +function f() { +>f : Symbol(f, Decl(classDeclarationBlockScoping2.ts, 0, 0)) + + class C {} +>C : Symbol(C, Decl(classDeclarationBlockScoping2.ts, 0, 14)) + + var c1 = C; +>c1 : Symbol(c1, Decl(classDeclarationBlockScoping2.ts, 2, 7)) +>C : Symbol(C, Decl(classDeclarationBlockScoping2.ts, 0, 14)) + { + class C {} +>C : Symbol(C, Decl(classDeclarationBlockScoping2.ts, 3, 5)) + + var c2 = C; +>c2 : Symbol(c2, Decl(classDeclarationBlockScoping2.ts, 5, 11)) +>C : Symbol(C, Decl(classDeclarationBlockScoping2.ts, 3, 5)) + } + return C === c1; +>C : Symbol(C, Decl(classDeclarationBlockScoping2.ts, 0, 14)) +>c1 : Symbol(c1, Decl(classDeclarationBlockScoping2.ts, 2, 7)) +} diff --git a/tests/baselines/reference/classDeclarationBlockScoping2.types b/tests/baselines/reference/classDeclarationBlockScoping2.types new file mode 100644 index 00000000000..0431d4dd2fd --- /dev/null +++ b/tests/baselines/reference/classDeclarationBlockScoping2.types @@ -0,0 +1,23 @@ +=== tests/cases/compiler/classDeclarationBlockScoping2.ts === +function f() { +>f : () => boolean + + class C {} +>C : C + + var c1 = C; +>c1 : typeof C +>C : typeof C + { + class C {} +>C : C + + var c2 = C; +>c2 : typeof C +>C : typeof C + } + return C === c1; +>C === c1 : boolean +>C : typeof C +>c1 : typeof C +} diff --git a/tests/baselines/reference/classExpressionTest1.errors.txt b/tests/baselines/reference/classExpressionTest1.errors.txt deleted file mode 100644 index 4d7e1cda639..00000000000 --- a/tests/baselines/reference/classExpressionTest1.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -tests/cases/compiler/classExpressionTest1.ts(2,11): error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. - - -==== tests/cases/compiler/classExpressionTest1.ts (1 errors) ==== - function M() { - class C { - ~ -!!! error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. - f() { - var t: T; - var x: X; - return { t, x }; - } - } - - var v = new C(); - return v.f(); - } \ No newline at end of file diff --git a/tests/baselines/reference/classExpressionTest1.symbols b/tests/baselines/reference/classExpressionTest1.symbols new file mode 100644 index 00000000000..684ee302895 --- /dev/null +++ b/tests/baselines/reference/classExpressionTest1.symbols @@ -0,0 +1,35 @@ +=== tests/cases/compiler/classExpressionTest1.ts === +function M() { +>M : Symbol(M, Decl(classExpressionTest1.ts, 0, 0)) + + class C { +>C : Symbol(C, Decl(classExpressionTest1.ts, 0, 14)) +>X : Symbol(X, Decl(classExpressionTest1.ts, 1, 12)) + + f() { +>f : Symbol(f, Decl(classExpressionTest1.ts, 1, 16)) +>T : Symbol(T, Decl(classExpressionTest1.ts, 2, 10)) + + var t: T; +>t : Symbol(t, Decl(classExpressionTest1.ts, 3, 15)) +>T : Symbol(T, Decl(classExpressionTest1.ts, 2, 10)) + + var x: X; +>x : Symbol(x, Decl(classExpressionTest1.ts, 4, 15)) +>X : Symbol(X, Decl(classExpressionTest1.ts, 1, 12)) + + return { t, x }; +>t : Symbol(t, Decl(classExpressionTest1.ts, 5, 20)) +>x : Symbol(x, Decl(classExpressionTest1.ts, 5, 23)) + } + } + + var v = new C(); +>v : Symbol(v, Decl(classExpressionTest1.ts, 9, 7)) +>C : Symbol(C, Decl(classExpressionTest1.ts, 0, 14)) + + return v.f(); +>v.f : Symbol(C.f, Decl(classExpressionTest1.ts, 1, 16)) +>v : Symbol(v, Decl(classExpressionTest1.ts, 9, 7)) +>f : Symbol(C.f, Decl(classExpressionTest1.ts, 1, 16)) +} diff --git a/tests/baselines/reference/classExpressionTest1.types b/tests/baselines/reference/classExpressionTest1.types new file mode 100644 index 00000000000..bf1ae0f2f7d --- /dev/null +++ b/tests/baselines/reference/classExpressionTest1.types @@ -0,0 +1,38 @@ +=== tests/cases/compiler/classExpressionTest1.ts === +function M() { +>M : () => { t: string; x: number; } + + class C { +>C : C +>X : X + + f() { +>f : () => { t: T; x: X; } +>T : T + + var t: T; +>t : T +>T : T + + var x: X; +>x : X +>X : X + + return { t, x }; +>{ t, x } : { t: T; x: X; } +>t : T +>x : X + } + } + + var v = new C(); +>v : C +>new C() : C +>C : typeof C + + return v.f(); +>v.f() : { t: string; x: number; } +>v.f : () => { t: T; x: number; } +>v : C +>f : () => { t: T; x: number; } +} diff --git a/tests/baselines/reference/classInsideBlock.errors.txt b/tests/baselines/reference/classInsideBlock.errors.txt deleted file mode 100644 index 369e77735e2..00000000000 --- a/tests/baselines/reference/classInsideBlock.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts(2,11): error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. - - -==== tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts (1 errors) ==== - function foo() { - class C { } - ~ -!!! error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration. - } \ No newline at end of file diff --git a/tests/baselines/reference/classInsideBlock.symbols b/tests/baselines/reference/classInsideBlock.symbols new file mode 100644 index 00000000000..5f96dd1b751 --- /dev/null +++ b/tests/baselines/reference/classInsideBlock.symbols @@ -0,0 +1,7 @@ +=== tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts === +function foo() { +>foo : Symbol(foo, Decl(classInsideBlock.ts, 0, 0)) + + class C { } +>C : Symbol(C, Decl(classInsideBlock.ts, 0, 16)) +} diff --git a/tests/baselines/reference/classInsideBlock.types b/tests/baselines/reference/classInsideBlock.types new file mode 100644 index 00000000000..7db5653c475 --- /dev/null +++ b/tests/baselines/reference/classInsideBlock.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts === +function foo() { +>foo : () => void + + class C { } +>C : C +} diff --git a/tests/baselines/reference/functionsWithModifiersInBlocks1.errors.txt b/tests/baselines/reference/functionsWithModifiersInBlocks1.errors.txt index 94e246f8972..f6240f5e697 100644 --- a/tests/baselines/reference/functionsWithModifiersInBlocks1.errors.txt +++ b/tests/baselines/reference/functionsWithModifiersInBlocks1.errors.txt @@ -4,12 +4,11 @@ tests/cases/compiler/functionsWithModifiersInBlocks1.ts(2,25): error TS1184: An tests/cases/compiler/functionsWithModifiersInBlocks1.ts(3,4): error TS1184: Modifiers cannot appear here. tests/cases/compiler/functionsWithModifiersInBlocks1.ts(3,20): error TS2393: Duplicate function implementation. tests/cases/compiler/functionsWithModifiersInBlocks1.ts(4,4): error TS1184: Modifiers cannot appear here. -tests/cases/compiler/functionsWithModifiersInBlocks1.ts(4,12): error TS1029: 'export' modifier must precede 'declare' modifier. tests/cases/compiler/functionsWithModifiersInBlocks1.ts(4,28): error TS2393: Duplicate function implementation. tests/cases/compiler/functionsWithModifiersInBlocks1.ts(4,32): error TS1184: An implementation cannot be declared in ambient contexts. -==== tests/cases/compiler/functionsWithModifiersInBlocks1.ts (9 errors) ==== +==== tests/cases/compiler/functionsWithModifiersInBlocks1.ts (8 errors) ==== { declare function f() { } ~~~~~~~ @@ -26,8 +25,6 @@ tests/cases/compiler/functionsWithModifiersInBlocks1.ts(4,32): error TS1184: An declare export function f() { } ~~~~~~~ !!! error TS1184: Modifiers cannot appear here. - ~~~~~~ -!!! error TS1029: 'export' modifier must precede 'declare' modifier. ~ !!! error TS2393: Duplicate function implementation. ~ diff --git a/tests/baselines/reference/withStatementErrors.errors.txt b/tests/baselines/reference/withStatementErrors.errors.txt index ba399f51197..bfea39b5426 100644 --- a/tests/baselines/reference/withStatementErrors.errors.txt +++ b/tests/baselines/reference/withStatementErrors.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/withStatementErrors.ts(3,7): error TS2410: All symbols within a 'with' block will be resolved to 'any'. -tests/cases/compiler/withStatementErrors.ts(13,5): error TS1129: Statement expected. +tests/cases/compiler/withStatementErrors.ts(15,5): error TS1129: Statement expected. tests/cases/compiler/withStatementErrors.ts(17,1): error TS1128: Declaration or statement expected. @@ -19,10 +19,10 @@ tests/cases/compiler/withStatementErrors.ts(17,1): error TS1128: Declaration or class C {} // error interface I {} // error - ~~~~~~~~~ -!!! error TS1129: Statement expected. module M {} // error + ~~~~~~ +!!! error TS1129: Statement expected. } ~ diff --git a/tests/baselines/reference/withStatementErrors.js b/tests/baselines/reference/withStatementErrors.js index 43236c94d8d..65b45999463 100644 --- a/tests/baselines/reference/withStatementErrors.js +++ b/tests/baselines/reference/withStatementErrors.js @@ -28,5 +28,5 @@ with (ooo.eee.oo.ah_ah.ting.tang.walla.walla) { function C() { } return C; - })(); -} // error + })(); // error +} // error