Skip to content

Commit 5bd5ec0

Browse files
committed
Add baselines
1 parent 6e72921 commit 5bd5ec0

1,046 files changed

Lines changed: 28989 additions & 840 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
classPoint.ts(1,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
2+
3+
4+
==== module.d.ts (0 errors) ====
5+
declare module A {
6+
export module Point {
7+
export var Origin: {
8+
x: number;
9+
y: number;
10+
}
11+
}
12+
}
13+
14+
==== classPoint.ts (1 errors) ====
15+
module A {
16+
~
17+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
18+
export class Point {
19+
constructor(public x: number, public y: number) { }
20+
}
21+
}
22+
23+
==== test.ts (0 errors) ====
24+
var p: { x: number; y: number; }
25+
var p = A.Point.Origin;
26+
var p = new A.Point(0, 0); // unexpected error here, bug 840000

tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(9,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
12
ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(10,19): error TS2304: Cannot find name 'T'.
3+
ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(19,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
24
ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(20,12): error TS2304: Cannot find name 'T'.
35
ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(22,23): error TS2304: Cannot find name 'T'.
6+
ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(34,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
47
ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(35,26): error TS2304: Cannot find name 'T'.
8+
ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(44,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
59
ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(46,15): error TS2304: Cannot find name 'T'.
610

711

8-
==== ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts (5 errors) ====
12+
==== ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts (9 errors) ====
913
// all expected to be errors
1014

1115
class clodule1<T>{
@@ -15,6 +19,8 @@ ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(46,15): err
1519
}
1620

1721
module clodule1 {
22+
~~~~~~~~
23+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
1824
function f(x: T) { }
1925
~
2026
!!! error TS2304: Cannot find name 'T'.
@@ -27,6 +33,8 @@ ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(46,15): err
2733
}
2834

2935
module clodule2 {
36+
~~~~~~~~
37+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
3038
var x: T;
3139
~
3240
!!! error TS2304: Cannot find name 'T'.
@@ -46,6 +54,8 @@ ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(46,15): err
4654
}
4755

4856
module clodule3 {
57+
~~~~~~~~
58+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
4959
export var y = { id: T };
5060
~
5161
!!! error TS2304: Cannot find name 'T'.
@@ -58,6 +68,8 @@ ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts(46,15): err
5868
}
5969

6070
module clodule4 {
71+
~~~~~~~~
72+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
6173
class D {
6274
name: T;
6375
~

tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'.
2+
ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(8,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
23
ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'.
34

45

5-
==== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (2 errors) ====
6+
==== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts (3 errors) ====
67
class clodule<T> {
78
id: string;
89
value: T;
@@ -13,6 +14,8 @@ ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFu
1314
}
1415

1516
module clodule {
17+
~~~~~~~
18+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
1619
// error: duplicate identifier expected
1720
export function fn<T>(x: T, y: T): T {
1821
~~

tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(5,12): error TS2300: Duplicate identifier 'fn'.
2+
ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(8,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
23
ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts(10,21): error TS2300: Duplicate identifier 'fn'.
34

45

5-
==== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (2 errors) ====
6+
==== ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts (3 errors) ====
67
class clodule<T> {
78
id: string;
89
value: T;
@@ -13,6 +14,8 @@ ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStati
1314
}
1415

1516
module clodule {
17+
~~~~~~~
18+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
1619
// error: duplicate identifier expected
1720
export function fn<T>(x: T, y: T): T {
1821
~~

tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts(8,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
12
ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts(11,24): error TS2341: Property 'sfn' is private and only accessible within class 'clodule<T>'.
23

34

4-
==== ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts (1 errors) ====
5+
==== ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts (2 errors) ====
56
class clodule<T> {
67
id: string;
78
value: T;
@@ -10,6 +11,8 @@ ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics
1011
}
1112

1213
module clodule {
14+
~~~~~~~
15+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
1316
// error: duplicate identifier expected
1417
export function fn<T>(x: T, y: T): number {
1518
return clodule.sfn('a');

tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'.
2+
ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(7,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
23
ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,21): error TS2300: Duplicate identifier 'Origin'.
4+
ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(12,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
35
ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'.
6+
ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(19,19): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
47
ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,25): error TS2300: Duplicate identifier 'Origin'.
58

69

7-
==== ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (4 errors) ====
10+
==== ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (7 errors) ====
811
class Point {
912
constructor(public x: number, public y: number) { }
1013

@@ -14,13 +17,17 @@ ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20
1417
}
1518

1619
module Point {
20+
~~~~~
21+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
1722
export function Origin() { return null; } //expected duplicate identifier error
1823
~~~~~~
1924
!!! error TS2300: Duplicate identifier 'Origin'.
2025
}
2126

2227

2328
module A {
29+
~
30+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
2431
export class Point {
2532
constructor(public x: number, public y: number) { }
2633

@@ -30,6 +37,8 @@ ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20
3037
}
3138

3239
export module Point {
40+
~~~~~
41+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
3342
export function Origin() { return ""; }//expected duplicate identifier error
3443
~~~~~~
3544
!!! error TS2300: Duplicate identifier 'Origin'.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts(7,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
2+
ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts(12,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
3+
ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts(19,19): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
4+
5+
6+
==== ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts (3 errors) ====
7+
class Point {
8+
constructor(public x: number, public y: number) { }
9+
10+
static Origin(): Point { return { x: 0, y: 0 }; }
11+
}
12+
13+
module Point {
14+
~~~~~
15+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
16+
function Origin() { return ""; }// not an error, since not exported
17+
}
18+
19+
20+
module A {
21+
~
22+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
23+
export class Point {
24+
constructor(public x: number, public y: number) { }
25+
26+
static Origin(): Point { return { x: 0, y: 0 }; }
27+
}
28+
29+
export module Point {
30+
~~~~~
31+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
32+
function Origin() { return ""; }// not an error since not exported
33+
}
34+
}

tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'.
2+
ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(7,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
23
ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(8,16): error TS2300: Duplicate identifier 'Origin'.
4+
ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(12,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
35
ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'.
6+
ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(19,19): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
47
ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(20,20): error TS2300: Duplicate identifier 'Origin'.
58

69

7-
==== ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (4 errors) ====
10+
==== ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (7 errors) ====
811
class Point {
912
constructor(public x: number, public y: number) { }
1013

@@ -14,13 +17,17 @@ ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(20,20):
1417
}
1518

1619
module Point {
20+
~~~~~
21+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
1722
export var Origin = ""; //expected duplicate identifier error
1823
~~~~~~
1924
!!! error TS2300: Duplicate identifier 'Origin'.
2025
}
2126

2227

2328
module A {
29+
~
30+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
2431
export class Point {
2532
constructor(public x: number, public y: number) { }
2633

@@ -30,6 +37,8 @@ ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts(20,20):
3037
}
3138

3239
export module Point {
40+
~~~~~
41+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
3342
export var Origin = ""; //expected duplicate identifier error
3443
~~~~~~
3544
!!! error TS2300: Duplicate identifier 'Origin'.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts(7,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
2+
ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts(12,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
3+
ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts(19,19): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
4+
5+
6+
==== ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts (3 errors) ====
7+
class Point {
8+
constructor(public x: number, public y: number) { }
9+
10+
static Origin: Point = { x: 0, y: 0 };
11+
}
12+
13+
module Point {
14+
~~~~~
15+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
16+
var Origin = ""; // not an error, since not exported
17+
}
18+
19+
20+
module A {
21+
~
22+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
23+
export class Point {
24+
constructor(public x: number, public y: number) { }
25+
26+
static Origin: Point = { x: 0, y: 0 };
27+
}
28+
29+
export module Point {
30+
~~~~~
31+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
32+
var Origin = ""; // not an error since not exported
33+
}
34+
}

tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1+
class.ts(1,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
2+
class.ts(1,10): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
3+
module.ts(1,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
4+
module.ts(1,10): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
5+
module.ts(2,19): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
16
module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
7+
simple.ts(5,8): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
28

39

4-
==== class.ts (0 errors) ====
10+
==== class.ts (2 errors) ====
511
module X.Y {
12+
~
13+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
14+
~
15+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
616
export class Point {
717
constructor(x: number, y: number) {
818
this.x = x;
@@ -13,10 +23,16 @@ module.ts(2,19): error TS2433: A namespace declaration cannot be in a different
1323
}
1424
}
1525

16-
==== module.ts (1 errors) ====
26+
==== module.ts (4 errors) ====
1727
module X.Y {
28+
~
29+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
30+
~
31+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
1832
export module Point {
1933
~~~~~
34+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
35+
~~~~~
2036
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
2137
export var Origin = new Point(0, 0);
2238
}
@@ -28,12 +44,14 @@ module.ts(2,19): error TS2433: A namespace declaration cannot be in a different
2844
var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ?
2945

3046

31-
==== simple.ts (0 errors) ====
47+
==== simple.ts (1 errors) ====
3248
class A {
3349
id: string;
3450
}
3551

3652
module A {
53+
~
54+
!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
3755
export var Instance = new A();
3856
}
3957

0 commit comments

Comments
 (0)