Skip to content

Commit 4b1ff74

Browse files
committed
Updating some tests for resolved bugs
1 parent e9cd8a0 commit 4b1ff74

9 files changed

+64
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts (3 errors) ====
2+
// classes cannot extend primitives
3+
4+
class C4a extends void {}
5+
~~~~
6+
!!! Identifier expected.
7+
class C5a extends null { }
8+
~~~~
9+
!!! Identifier expected.
10+
~
11+
!!! ';' expected.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (3 errors) ====
2+
class C2 extends { foo: string; } { } // error
3+
~
4+
!!! Identifier expected.
5+
6+
class C6 extends []{ } // error
7+
~
8+
!!! Identifier expected.
9+
~
10+
!!! ';' expected.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//// [duplicateVarAndImport.ts]
2+
// no error since module is not instantiated
3+
var a;
4+
module M {}
5+
import a = M;
6+
7+
//// [duplicateVarAndImport.js]
8+
var a;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
==== tests/cases/compiler/duplicateVarAndImport2.ts (1 errors) ====
2+
// error since module is instantiated
3+
var a;
4+
module M { export var x = 1; }
5+
import a = M;
6+
~~~~~~~~~~~~~
7+
!!! Import declaration conflicts with local declaration of 'a'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//// [duplicateVarAndImport2.ts]
2+
// error since module is instantiated
3+
var a;
4+
module M { export var x = 1; }
5+
import a = M;
6+
7+
//// [duplicateVarAndImport2.js]
8+
var a;
9+
var M;
10+
(function (M) {
11+
M.x = 1;
12+
})(M || (M = {}));
13+
var a = M;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// no error since module is not instantiated
2+
var a;
3+
module M {}
4+
import a = M;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// error since module is instantiated
2+
var a;
3+
module M { export var x = 1; }
4+
import a = M;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// classes cannot extend primitives
2+
3+
class C4a extends void {}
4+
class C5a extends null { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class C2 extends { foo: string; } { } // error
2+
3+
class C6 extends []{ } // error

0 commit comments

Comments
 (0)