Skip to content

Commit 5ecd78e

Browse files
committed
Merge pull request #2 from Microsoft/TestUpdatesForResolvedBugs
Updating some tests for resolved bugs
2 parents e9cd8a0 + da4547f commit 5ecd78e

File tree

9 files changed

+66
-0
lines changed

9 files changed

+66
-0
lines changed
Lines changed: 11 additions & 0 deletions
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.
Lines changed: 10 additions & 0 deletions
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.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//// [duplicateVarAndImport.ts]
2+
// no error since module is not instantiated
3+
4+
var a;
5+
module M { }
6+
import a = M;
7+
8+
//// [duplicateVarAndImport.js]
9+
var a;
Lines changed: 7 additions & 0 deletions
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'
Lines changed: 13 additions & 0 deletions
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;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// no error since module is not instantiated
2+
3+
var a;
4+
module M { }
5+
import a = M;
Lines changed: 4 additions & 0 deletions
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)