add baselines

This commit is contained in:
Wesley Wigham 2015-12-04 15:44:35 -08:00
parent 00576527bd
commit cb4a40867e
10 changed files with 101 additions and 85 deletions

View File

@ -1,43 +0,0 @@
tests/cases/compiler/a.ts(1,1): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
tests/cases/compiler/a.ts(2,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
tests/cases/compiler/a.ts(3,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
tests/cases/compiler/b.ts(1,7): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
tests/cases/compiler/b.ts(4,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
tests/cases/compiler/b.ts(7,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
tests/cases/compiler/b.ts(10,8): error TS2304: Cannot find name 'undefined'.
==== tests/cases/compiler/a.ts (3 errors) ====
type undefined = string;
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
var undefined = void 0;
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
var undefined = null;
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
function p(undefined = 42) {
return undefined;
}
==== tests/cases/compiler/b.ts (4 errors) ====
class undefined {
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
foo: string;
}
interface undefined {
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
member: number;
}
namespace undefined {
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
export var x = 42;
}
var x: undefined;
~~~~~~~~~
!!! error TS2304: Cannot find name 'undefined'.
var x: typeof undefined;

View File

@ -1,42 +0,0 @@
//// [tests/cases/compiler/undefinedTypeAssignment.ts] ////
//// [a.ts]
type undefined = string;
var undefined = void 0;
var undefined = null;
function p(undefined = 42) {
return undefined;
}
//// [b.ts]
class undefined {
foo: string;
}
interface undefined {
member: number;
}
namespace undefined {
export var x = 42;
}
var x: undefined;
var x: typeof undefined;
//// [a.js]
var undefined = void 0;
var undefined = null;
function p(undefined) {
if (undefined === void 0) { undefined = 42; }
return undefined;
}
//// [b.js]
var undefined = (function () {
function undefined() {
}
return undefined;
})();
var undefined;
(function (undefined) {
undefined.x = 42;
})(undefined || (undefined = {}));
var x;
var x;

View File

@ -0,0 +1,11 @@
tests/cases/compiler/undefinedTypeAssignment1.ts(1,1): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
==== tests/cases/compiler/undefinedTypeAssignment1.ts (1 errors) ====
type undefined = string;
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
function p(undefined = "wat") {
return undefined;
}

View File

@ -0,0 +1,12 @@
//// [undefinedTypeAssignment1.ts]
type undefined = string;
function p(undefined = "wat") {
return undefined;
}
//// [undefinedTypeAssignment1.js]
function p(undefined) {
if (undefined === void 0) { undefined = "wat"; }
return undefined;
}

View File

@ -0,0 +1,8 @@
tests/cases/compiler/undefinedTypeAssignment2.ts(1,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
==== tests/cases/compiler/undefinedTypeAssignment2.ts (1 errors) ====
var undefined = void 0;
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.

View File

@ -0,0 +1,6 @@
//// [undefinedTypeAssignment2.ts]
var undefined = void 0;
//// [undefinedTypeAssignment2.js]
var undefined = void 0;

View File

@ -0,0 +1,8 @@
tests/cases/compiler/undefinedTypeAssignment3.ts(1,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
==== tests/cases/compiler/undefinedTypeAssignment3.ts (1 errors) ====
var undefined = null;
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.

View File

@ -0,0 +1,6 @@
//// [undefinedTypeAssignment3.ts]
var undefined = null;
//// [undefinedTypeAssignment3.js]
var undefined = null;

View File

@ -0,0 +1,24 @@
tests/cases/compiler/undefinedTypeAssignment4.ts(1,7): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
tests/cases/compiler/undefinedTypeAssignment4.ts(4,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
tests/cases/compiler/undefinedTypeAssignment4.ts(7,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
==== tests/cases/compiler/undefinedTypeAssignment4.ts (3 errors) ====
class undefined {
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
foo: string;
}
interface undefined {
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
member: number;
}
namespace undefined {
~~~~~~~~~
!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'.
export var x = 42;
}
var x: undefined;
var y: typeof undefined;

View File

@ -0,0 +1,26 @@
//// [undefinedTypeAssignment4.ts]
class undefined {
foo: string;
}
interface undefined {
member: number;
}
namespace undefined {
export var x = 42;
}
var x: undefined;
var y: typeof undefined;
//// [undefinedTypeAssignment4.js]
var undefined = (function () {
function undefined() {
}
return undefined;
})();
var undefined;
(function (undefined) {
undefined.x = 42;
})(undefined || (undefined = {}));
var x;
var y;