mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Accepting new baselines
This commit is contained in:
@@ -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.
|
||||
}
|
||||
}
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
=== tests/cases/compiler/classDeclarationBlockScoping1.ts ===
|
||||
class C {
|
||||
>C : C
|
||||
}
|
||||
|
||||
{
|
||||
class C {
|
||||
>C : C
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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))
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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<X> {
|
||||
~
|
||||
!!! error TS9004: 'class' declarations are only supported directly inside a module or as a top level declaration.
|
||||
f<T>() {
|
||||
var t: T;
|
||||
var x: X;
|
||||
return { t, x };
|
||||
}
|
||||
}
|
||||
|
||||
var v = new C<number>();
|
||||
return v.f<string>();
|
||||
}
|
||||
35
tests/baselines/reference/classExpressionTest1.symbols
Normal file
35
tests/baselines/reference/classExpressionTest1.symbols
Normal file
@@ -0,0 +1,35 @@
|
||||
=== tests/cases/compiler/classExpressionTest1.ts ===
|
||||
function M() {
|
||||
>M : Symbol(M, Decl(classExpressionTest1.ts, 0, 0))
|
||||
|
||||
class C<X> {
|
||||
>C : Symbol(C, Decl(classExpressionTest1.ts, 0, 14))
|
||||
>X : Symbol(X, Decl(classExpressionTest1.ts, 1, 12))
|
||||
|
||||
f<T>() {
|
||||
>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<number>();
|
||||
>v : Symbol(v, Decl(classExpressionTest1.ts, 9, 7))
|
||||
>C : Symbol(C, Decl(classExpressionTest1.ts, 0, 14))
|
||||
|
||||
return v.f<string>();
|
||||
>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))
|
||||
}
|
||||
38
tests/baselines/reference/classExpressionTest1.types
Normal file
38
tests/baselines/reference/classExpressionTest1.types
Normal file
@@ -0,0 +1,38 @@
|
||||
=== tests/cases/compiler/classExpressionTest1.ts ===
|
||||
function M() {
|
||||
>M : () => { t: string; x: number; }
|
||||
|
||||
class C<X> {
|
||||
>C : C<X>
|
||||
>X : X
|
||||
|
||||
f<T>() {
|
||||
>f : <T>() => { 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<number>();
|
||||
>v : C<number>
|
||||
>new C<number>() : C<number>
|
||||
>C : typeof C
|
||||
|
||||
return v.f<string>();
|
||||
>v.f<string>() : { t: string; x: number; }
|
||||
>v.f : <T>() => { t: T; x: number; }
|
||||
>v : C<number>
|
||||
>f : <T>() => { t: T; x: number; }
|
||||
}
|
||||
@@ -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.
|
||||
}
|
||||
7
tests/baselines/reference/classInsideBlock.symbols
Normal file
7
tests/baselines/reference/classInsideBlock.symbols
Normal file
@@ -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))
|
||||
}
|
||||
7
tests/baselines/reference/classInsideBlock.types
Normal file
7
tests/baselines/reference/classInsideBlock.types
Normal file
@@ -0,0 +1,7 @@
|
||||
=== tests/cases/conformance/classes/classDeclarations/classInsideBlock.ts ===
|
||||
function foo() {
|
||||
>foo : () => void
|
||||
|
||||
class C { }
|
||||
>C : C
|
||||
}
|
||||
@@ -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.
|
||||
~
|
||||
|
||||
@@ -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.
|
||||
|
||||
}
|
||||
~
|
||||
|
||||
@@ -28,5 +28,5 @@ with (ooo.eee.oo.ah_ah.ting.tang.walla.walla) {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
})();
|
||||
} // error
|
||||
})(); // error
|
||||
} // error
|
||||
|
||||
Reference in New Issue
Block a user