Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating some tests for resolved bugs #2

Merged
merged 2 commits into from
Jul 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/baselines/reference/classExtendingPrimitive2.errors.txt
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions tests/baselines/reference/classExtendsEveryObjectType2.errors.txt
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 9 additions & 0 deletions tests/baselines/reference/duplicateVarAndImport.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//// [duplicateVarAndImport.ts]
// no error since module is not instantiated

var a;
module M { }
import a = M;

//// [duplicateVarAndImport.js]
var a;
7 changes: 7 additions & 0 deletions tests/baselines/reference/duplicateVarAndImport2.errors.txt
Original file line number Diff line number Diff line change
@@ -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 changes: 13 additions & 0 deletions tests/baselines/reference/duplicateVarAndImport2.js
Original file line number Diff line number Diff line change
@@ -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;
5 changes: 5 additions & 0 deletions tests/cases/compiler/duplicateVarAndImport.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// no error since module is not instantiated

var a;
module M { }
import a = M;
4 changes: 4 additions & 0 deletions tests/cases/compiler/duplicateVarAndImport2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// error since module is instantiated
var a;
module M { export var x = 1; }
import a = M;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// classes cannot extend primitives

class C4a extends void {}
class C5a extends null { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class C2 extends { foo: string; } { } // error

class C6 extends []{ } // error