mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-26 21:05:54 -06:00
Updating some tests for resolved bugs
This commit is contained in:
parent
e9cd8a0e88
commit
4b1ff742dd
@ -0,0 +1,11 @@
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts (3 errors) ====
|
||||
// classes cannot extend primitives
|
||||
|
||||
class C4a extends void {}
|
||||
~~~~
|
||||
!!! Identifier expected.
|
||||
class C5a extends null { }
|
||||
~~~~
|
||||
!!! Identifier expected.
|
||||
~
|
||||
!!! ';' expected.
|
||||
@ -0,0 +1,10 @@
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (3 errors) ====
|
||||
class C2 extends { foo: string; } { } // error
|
||||
~
|
||||
!!! Identifier expected.
|
||||
|
||||
class C6 extends []{ } // error
|
||||
~
|
||||
!!! Identifier expected.
|
||||
~
|
||||
!!! ';' expected.
|
||||
8
tests/baselines/reference/duplicateVarAndImport.js
Normal file
8
tests/baselines/reference/duplicateVarAndImport.js
Normal file
@ -0,0 +1,8 @@
|
||||
//// [duplicateVarAndImport.ts]
|
||||
// no error since module is not instantiated
|
||||
var a;
|
||||
module M {}
|
||||
import a = M;
|
||||
|
||||
//// [duplicateVarAndImport.js]
|
||||
var a;
|
||||
@ -0,0 +1,7 @@
|
||||
==== tests/cases/compiler/duplicateVarAndImport2.ts (1 errors) ====
|
||||
// error since module is instantiated
|
||||
var a;
|
||||
module M { export var x = 1; }
|
||||
import a = M;
|
||||
~~~~~~~~~~~~~
|
||||
!!! Import declaration conflicts with local declaration of 'a'
|
||||
13
tests/baselines/reference/duplicateVarAndImport2.js
Normal file
13
tests/baselines/reference/duplicateVarAndImport2.js
Normal file
@ -0,0 +1,13 @@
|
||||
//// [duplicateVarAndImport2.ts]
|
||||
// error since module is instantiated
|
||||
var a;
|
||||
module M { export var x = 1; }
|
||||
import a = M;
|
||||
|
||||
//// [duplicateVarAndImport2.js]
|
||||
var a;
|
||||
var M;
|
||||
(function (M) {
|
||||
M.x = 1;
|
||||
})(M || (M = {}));
|
||||
var a = M;
|
||||
4
tests/cases/compiler/duplicateVarAndImport.ts
Normal file
4
tests/cases/compiler/duplicateVarAndImport.ts
Normal file
@ -0,0 +1,4 @@
|
||||
// no error since module is not instantiated
|
||||
var a;
|
||||
module M {}
|
||||
import a = M;
|
||||
4
tests/cases/compiler/duplicateVarAndImport2.ts
Normal file
4
tests/cases/compiler/duplicateVarAndImport2.ts
Normal file
@ -0,0 +1,4 @@
|
||||
// error since module is instantiated
|
||||
var a;
|
||||
module M { export var x = 1; }
|
||||
import a = M;
|
||||
@ -0,0 +1,4 @@
|
||||
// classes cannot extend primitives
|
||||
|
||||
class C4a extends void {}
|
||||
class C5a extends null { }
|
||||
@ -0,0 +1,3 @@
|
||||
class C2 extends { foo: string; } { } // error
|
||||
|
||||
class C6 extends []{ } // error
|
||||
Loading…
x
Reference in New Issue
Block a user