mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/constructorStaticParamName.ts(4,18): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/constructorStaticParamName.ts(4,18): error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constructorStaticParamName.ts (1 errors) ====
|
||||
@@ -7,6 +7,6 @@ tests/cases/compiler/constructorStaticParamName.ts(4,18): error TS1003: Identifi
|
||||
class test {
|
||||
constructor (static) { }
|
||||
~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ class test {
|
||||
//// [constructorStaticParamName.js]
|
||||
// static as constructor parameter name should only give error if 'use strict'
|
||||
var test = (function () {
|
||||
function test() {
|
||||
function test(static) {
|
||||
}
|
||||
return test;
|
||||
})();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/constructorStaticParamNameErrors.ts(4,18): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/constructorStaticParamNameErrors.ts(4,18): error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constructorStaticParamNameErrors.ts (1 errors) ====
|
||||
@@ -7,5 +7,5 @@ tests/cases/compiler/constructorStaticParamNameErrors.ts(4,18): error TS1003: Id
|
||||
class test {
|
||||
constructor (static) { }
|
||||
~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
}
|
||||
@@ -9,7 +9,7 @@ class test {
|
||||
'use strict';
|
||||
// static as constructor parameter name should give error if 'use strict'
|
||||
var test = (function () {
|
||||
function test() {
|
||||
function test(static) {
|
||||
}
|
||||
return test;
|
||||
})();
|
||||
|
||||
@@ -21,45 +21,23 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(47,17): error TS
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(49,13): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(53,13): error TS2304: Cannot find name 'console'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(58,5): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(65,29): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(69,13): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(72,37): error TS1127: Invalid character.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(81,13): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(89,23): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(90,13): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(94,17): error TS1134: Variable declaration expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(95,13): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(105,29): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(106,13): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(108,24): error TS2304: Cannot find name 'any'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(108,30): error TS2304: Cannot find name 'bool'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(108,37): error TS2304: Cannot find name 'declare'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(108,47): error TS2304: Cannot find name 'constructor'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(108,61): error TS2304: Cannot find name 'get'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(108,67): error TS2304: Cannot find name 'implements'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(111,9): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(118,9): error TS2304: Cannot find name 'STATEMENTS'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(118,21): error TS1005: ',' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(118,30): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(118,39): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(108,24): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(138,13): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(141,32): error TS1005: '{' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(143,13): error TS1005: 'try' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(155,9): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(155,16): error TS2304: Cannot find name 'TYPES'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(155,23): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(155,32): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(159,24): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(159,30): error TS1005: '(' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(159,31): error TS2304: Cannot find name 'Property'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(166,13): error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(176,9): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(176,16): error TS2304: Cannot find name 'OPERATOR'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(176,26): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(176,35): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(180,40): error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(205,28): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(210,5): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(213,16): error TS2304: Cannot find name 'bool'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(218,10): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(223,23): error TS2304: Cannot find name 'bool'.
|
||||
@@ -69,6 +47,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,9): error TS
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,16): error TS2304: Cannot find name 'method1'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,24): error TS2304: Cannot find name 'val'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,27): error TS1005: ',' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,28): error TS2304: Cannot find name 'number'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,36): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,9): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,16): error TS2304: Cannot find name 'method2'.
|
||||
@@ -83,23 +62,27 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,9): error TS
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,16): error TS2304: Cannot find name 'Overloads'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,26): error TS2304: Cannot find name 'value'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,31): error TS1005: ',' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,33): error TS2304: Cannot find name 'string'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,9): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,16): error TS2304: Cannot find name 'Overloads'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,27): error TS1135: Argument expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,33): error TS1005: '(' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,35): error TS2304: Cannot find name 'string'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,43): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,52): error TS2304: Cannot find name 'string'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,60): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,65): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,9): error TS2304: Cannot find name 'public'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,16): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,16): error TS2304: Cannot find name 'DefaultValue'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,29): error TS2304: Cannot find name 'value'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,35): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error TS2304: Cannot find name 'string'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,55): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts (99 errors) ====
|
||||
==== tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts (82 errors) ====
|
||||
declare module "fs" {
|
||||
export class File {
|
||||
constructor(filename: string);
|
||||
@@ -214,8 +197,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public VARIABLES(): number {
|
||||
~~~~~~
|
||||
!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
|
||||
var local = Number.MAX_VALUE;
|
||||
var min = Number.MIN_VALUE;
|
||||
var inf = Number.NEGATIVE_INFINITY -
|
||||
@@ -255,11 +236,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
var constructor = 0;
|
||||
var get = 0;
|
||||
var implements = 0;
|
||||
~~~~~~~~~~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
var interface = 0;
|
||||
~~~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
var let = 0;
|
||||
var module = 0;
|
||||
var number = 0;
|
||||
@@ -277,23 +254,11 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
!!! error TS1109: Expression expected.
|
||||
|
||||
var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'any'.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'bool'.
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'declare'.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'constructor'.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'get'.
|
||||
~~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'implements'.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'.
|
||||
|
||||
return 0;
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
|
||||
/// <summary>
|
||||
/// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally
|
||||
@@ -301,14 +266,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
/// <param name="i"></param>
|
||||
/// <returns></returns>
|
||||
STATEMENTS(i: number): number {
|
||||
~~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'STATEMENTS'.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
var retVal = 0;
|
||||
if (i == 1)
|
||||
retVal = 1;
|
||||
@@ -352,14 +309,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public TYPES(): number {
|
||||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'TYPES'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
var retVal = 0;
|
||||
var c = new CLASS();
|
||||
var xx: IF = c;
|
||||
@@ -389,14 +338,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
public OPERATOR(): number {
|
||||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'OPERATOR'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
var a: number[] = [1, 2, 3, 4, 5, ];/*[] bug*/ // YES []
|
||||
var i = a[1];/*[]*/
|
||||
i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/
|
||||
@@ -435,8 +376,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
}
|
||||
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
|
||||
interface IF {
|
||||
Foo(): bool;
|
||||
@@ -480,6 +419,8 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
!!! error TS2304: Cannot find name 'val'.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'number'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
return val;
|
||||
@@ -529,6 +470,8 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
!!! error TS2304: Cannot find name 'value'.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'string'.
|
||||
public Overloads( while : string, ...rest: string[]) { &
|
||||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
@@ -538,14 +481,20 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
!!! error TS1135: Argument expression expected.
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'string'.
|
||||
~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'string'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
|
||||
public DefaultValue(value?: string = "Hello") { }
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'public'.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~~~~~~~~
|
||||
@@ -555,7 +504,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~~~~~~
|
||||
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
|
||||
!!! error TS2304: Cannot find name 'string'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
|
||||
@@ -342,7 +342,6 @@ var TypeScriptAllInOne;
|
||||
})(TypeScriptAllInOne || (TypeScriptAllInOne = {}));
|
||||
var BasicFeatures = (function () {
|
||||
function BasicFeatures() {
|
||||
this.implements = 0;
|
||||
}
|
||||
/// <summary>
|
||||
/// Test various of variables. Including nullable,key world as variable,special format
|
||||
@@ -375,115 +374,117 @@ var BasicFeatures = (function () {
|
||||
var declare = 0;
|
||||
var constructor = 0;
|
||||
var get = 0;
|
||||
var ;
|
||||
var implements = 0;
|
||||
var interface = 0;
|
||||
var let = 0;
|
||||
var module = 0;
|
||||
var number = 0;
|
||||
var package = 0;
|
||||
var private = 0;
|
||||
var protected = 0;
|
||||
var public = 0;
|
||||
var set = 0;
|
||||
var static = 0;
|
||||
var string = 0 / >
|
||||
;
|
||||
var yield = 0;
|
||||
var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield;
|
||||
return 0;
|
||||
};
|
||||
/// <summary>
|
||||
/// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally
|
||||
/// </summary>
|
||||
/// <param name="i"></param>
|
||||
/// <returns></returns>
|
||||
BasicFeatures.prototype.STATEMENTS = function (i) {
|
||||
var retVal = 0;
|
||||
if (i == 1)
|
||||
retVal = 1;
|
||||
else
|
||||
retVal = 0;
|
||||
switch (i) {
|
||||
case 2:
|
||||
retVal = 1;
|
||||
break;
|
||||
case 3:
|
||||
retVal = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
for (var x in { x: 0, y: 1 }) {
|
||||
!;
|
||||
try {
|
||||
throw null;
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
try {
|
||||
}
|
||||
finally {
|
||||
try { }
|
||||
catch (Exception) { }
|
||||
}
|
||||
return retVal;
|
||||
};
|
||||
/// <summary>
|
||||
/// Test types in ts language. Including class,struct,interface,delegate,anonymous type
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
BasicFeatures.prototype.TYPES = function () {
|
||||
var retVal = 0;
|
||||
var c = new CLASS();
|
||||
var xx = c;
|
||||
retVal += ;
|
||||
try { }
|
||||
catch () { }
|
||||
Property;
|
||||
retVal += c.Member();
|
||||
retVal += xx.Foo() ? 0 : 1;
|
||||
//anonymous type
|
||||
var anony = { a: new CLASS() };
|
||||
retVal += anony.a.d();
|
||||
return retVal;
|
||||
};
|
||||
///// <summary>
|
||||
///// Test different operators
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
BasicFeatures.prototype.OPERATOR = function () {
|
||||
var a = [1, 2, 3, 4, 5,]; /*[] bug*/ // YES []
|
||||
var i = a[1]; /*[]*/
|
||||
i = i + i - i * i / i % i & i | i ^ i; /*+ - * / % & | ^*/
|
||||
var b = true && false || true ^ false; /*& | ^*/
|
||||
b = !b; /*!*/
|
||||
i = ~i; /*~i*/
|
||||
b = i < (i - 1) && (i + 1) > i; /*< && >*/
|
||||
var f = true ? 1 : 0; /*? :*/ // YES :
|
||||
i++; /*++*/
|
||||
i--; /*--*/
|
||||
b = true && false || true; /*&& ||*/
|
||||
i = i << 5; /*<<*/
|
||||
i = i >> 5; /*>>*/
|
||||
var j = i;
|
||||
b = i == j && i != j && i <= j && i >= j; /*= == && != <= >=*/
|
||||
i += 5.0; /*+=*/
|
||||
i -= i; /*-=*/
|
||||
i *= i; /**=*/
|
||||
if (i == 0)
|
||||
i++;
|
||||
i /= i; /*/=*/
|
||||
i %= i; /*%=*/
|
||||
i &= i; /*&=*/
|
||||
i |= i; /*|=*/
|
||||
i ^= i; /*^=*/
|
||||
i <<= i; /*<<=*/
|
||||
i >>= i; /*>>=*/
|
||||
if (i == 0 && != b && f == 1)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
};
|
||||
return BasicFeatures;
|
||||
})();
|
||||
var interface = 0;
|
||||
var let = 0;
|
||||
var module = 0;
|
||||
var number = 0;
|
||||
var package = 0;
|
||||
var private = 0;
|
||||
var protected = 0;
|
||||
var public = 0;
|
||||
var set = 0;
|
||||
var static = 0;
|
||||
var string = 0 / >
|
||||
;
|
||||
var yield = 0;
|
||||
var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield;
|
||||
return 0;
|
||||
/// <summary>
|
||||
/// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally
|
||||
/// </summary>
|
||||
/// <param name="i"></param>
|
||||
/// <returns></returns>
|
||||
STATEMENTS(i, number);
|
||||
number;
|
||||
{
|
||||
var retVal = 0;
|
||||
if (i == 1)
|
||||
retVal = 1;
|
||||
else
|
||||
retVal = 0;
|
||||
switch (i) {
|
||||
case 2:
|
||||
retVal = 1;
|
||||
break;
|
||||
case 3:
|
||||
retVal = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
for (var x in { x: 0, y: 1 }) {
|
||||
!;
|
||||
try {
|
||||
throw null;
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
try {
|
||||
}
|
||||
finally {
|
||||
try { }
|
||||
catch (Exception) { }
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
TYPES();
|
||||
number;
|
||||
{
|
||||
var retVal = 0;
|
||||
var c = new CLASS();
|
||||
var xx = c;
|
||||
retVal += ;
|
||||
try { }
|
||||
catch () { }
|
||||
Property;
|
||||
retVal += c.Member();
|
||||
retVal += xx.Foo() ? 0 : 1;
|
||||
//anonymous type
|
||||
var anony = { a: new CLASS() };
|
||||
retVal += anony.a.d();
|
||||
return retVal;
|
||||
}
|
||||
OPERATOR();
|
||||
number;
|
||||
{
|
||||
var a = [1, 2, 3, 4, 5,]; /*[] bug*/ // YES []
|
||||
var i = a[1]; /*[]*/
|
||||
i = i + i - i * i / i % i & i | i ^ i; /*+ - * / % & | ^*/
|
||||
var b = true && false || true ^ false; /*& | ^*/
|
||||
b = !b; /*!*/
|
||||
i = ~i; /*~i*/
|
||||
b = i < (i - 1) && (i + 1) > i; /*< && >*/
|
||||
var f = true ? 1 : 0; /*? :*/ // YES :
|
||||
i++; /*++*/
|
||||
i--; /*--*/
|
||||
b = true && false || true; /*&& ||*/
|
||||
i = i << 5; /*<<*/
|
||||
i = i >> 5; /*>>*/
|
||||
var j = i;
|
||||
b = i == j && i != j && i <= j && i >= j; /*= == && != <= >=*/
|
||||
i += 5.0; /*+=*/
|
||||
i -= i; /*-=*/
|
||||
i *= i; /**=*/
|
||||
if (i == 0)
|
||||
i++;
|
||||
i /= i; /*/=*/
|
||||
i %= i; /*%=*/
|
||||
i &= i; /*&=*/
|
||||
i |= i; /*|=*/
|
||||
i ^= i; /*^=*/
|
||||
i <<= i; /*<<=*/
|
||||
i >>= i; /*>>=*/
|
||||
if (i == 0 && != b && f == 1)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
var CLASS = (function () {
|
||||
function CLASS() {
|
||||
this.d = function () { ; };
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
tests/cases/compiler/convertKeywordsYes.ts(293,11): error TS1005: '{' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(293,21): error TS1005: ';' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(294,11): error TS1005: '{' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(296,11): error TS1005: '{' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(296,19): error TS1005: ';' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(297,11): error TS1005: '{' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(297,19): error TS1005: ';' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(298,11): error TS1005: '{' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(298,21): error TS1005: ';' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(299,11): error TS1005: '{' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(299,18): error TS1005: ';' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(301,11): error TS1005: '{' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(301,18): error TS1005: ';' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(303,11): error TS1005: '{' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(303,17): error TS1005: ';' expected.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(292,11): error TS1212: Identifier expected. 'implements' is a reserved word. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(293,11): error TS1212: Identifier expected. 'interface' is a reserved word. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(294,11): error TS1212: Identifier expected. 'let' is a reserved word. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(296,11): error TS1212: Identifier expected. 'package' is a reserved word. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(297,11): error TS1212: Identifier expected. 'private' is a reserved word. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(298,11): error TS1212: Identifier expected. 'protected' is a reserved word. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(299,11): error TS1212: Identifier expected. 'public' is a reserved word. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(301,11): error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/convertKeywordsYes.ts(303,11): error TS1212: Identifier expected. 'yield' is a reserved word. Class definitions are automatically in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/compiler/convertKeywordsYes.ts (15 errors) ====
|
||||
==== tests/cases/compiler/convertKeywordsYes.ts (9 errors) ====
|
||||
// reserved ES5 future in strict mode
|
||||
|
||||
var constructor = 0;
|
||||
@@ -308,46 +302,34 @@ tests/cases/compiler/convertKeywordsYes.ts(303,17): error TS1005: ';' expected.
|
||||
module bigModule {
|
||||
class constructor { }
|
||||
class implements { }
|
||||
~~~~~~~~~~
|
||||
!!! error TS1212: Identifier expected. 'implements' is a reserved word. Class definitions are automatically in strict mode.
|
||||
class interface { }
|
||||
~~~~~~~~~
|
||||
!!! error TS1005: '{' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
!!! error TS1212: Identifier expected. 'interface' is a reserved word. Class definitions are automatically in strict mode.
|
||||
class let { }
|
||||
~~~
|
||||
!!! error TS1005: '{' expected.
|
||||
!!! error TS1212: Identifier expected. 'let' is a reserved word. Class definitions are automatically in strict mode.
|
||||
class module { }
|
||||
class package { }
|
||||
~~~~~~~
|
||||
!!! error TS1005: '{' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
!!! error TS1212: Identifier expected. 'package' is a reserved word. Class definitions are automatically in strict mode.
|
||||
class private { }
|
||||
~~~~~~~
|
||||
!!! error TS1005: '{' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
!!! error TS1212: Identifier expected. 'private' is a reserved word. Class definitions are automatically in strict mode.
|
||||
class protected { }
|
||||
~~~~~~~~~
|
||||
!!! error TS1005: '{' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
!!! error TS1212: Identifier expected. 'protected' is a reserved word. Class definitions are automatically in strict mode.
|
||||
class public { }
|
||||
~~~~~~
|
||||
!!! error TS1005: '{' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
!!! error TS1212: Identifier expected. 'public' is a reserved word. Class definitions are automatically in strict mode.
|
||||
class set { }
|
||||
class static { }
|
||||
~~~~~~
|
||||
!!! error TS1005: '{' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
!!! error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
class get { }
|
||||
class yield { }
|
||||
~~~~~
|
||||
!!! error TS1005: '{' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
!!! error TS1212: Identifier expected. 'yield' is a reserved word. Class definitions are automatically in strict mode.
|
||||
class declare { }
|
||||
}
|
||||
@@ -505,81 +505,66 @@ var bigModule;
|
||||
}
|
||||
return constructor;
|
||||
})();
|
||||
var default_1 = (function () {
|
||||
function default_1() {
|
||||
var implements = (function () {
|
||||
function implements() {
|
||||
}
|
||||
return default_1;
|
||||
return implements;
|
||||
})();
|
||||
var default_2 = (function () {
|
||||
function default_2() {
|
||||
var interface = (function () {
|
||||
function interface() {
|
||||
}
|
||||
return default_2;
|
||||
return interface;
|
||||
})();
|
||||
interface;
|
||||
{ }
|
||||
var default_3 = (function () {
|
||||
function default_3() {
|
||||
var let = (function () {
|
||||
function let() {
|
||||
}
|
||||
return default_3;
|
||||
return let;
|
||||
})();
|
||||
var _a = void 0;
|
||||
var module = (function () {
|
||||
function module() {
|
||||
}
|
||||
return module;
|
||||
})();
|
||||
var default_4 = (function () {
|
||||
function default_4() {
|
||||
var package = (function () {
|
||||
function package() {
|
||||
}
|
||||
return default_4;
|
||||
return package;
|
||||
})();
|
||||
package;
|
||||
{ }
|
||||
var default_5 = (function () {
|
||||
function default_5() {
|
||||
var private = (function () {
|
||||
function private() {
|
||||
}
|
||||
return default_5;
|
||||
return private;
|
||||
})();
|
||||
private;
|
||||
{ }
|
||||
var default_6 = (function () {
|
||||
function default_6() {
|
||||
var protected = (function () {
|
||||
function protected() {
|
||||
}
|
||||
return default_6;
|
||||
return protected;
|
||||
})();
|
||||
protected;
|
||||
{ }
|
||||
var default_7 = (function () {
|
||||
function default_7() {
|
||||
var public = (function () {
|
||||
function public() {
|
||||
}
|
||||
return default_7;
|
||||
return public;
|
||||
})();
|
||||
public;
|
||||
{ }
|
||||
var set = (function () {
|
||||
function set() {
|
||||
}
|
||||
return set;
|
||||
})();
|
||||
var default_8 = (function () {
|
||||
function default_8() {
|
||||
var static = (function () {
|
||||
function static() {
|
||||
}
|
||||
return default_8;
|
||||
return static;
|
||||
})();
|
||||
static;
|
||||
{ }
|
||||
var get = (function () {
|
||||
function get() {
|
||||
}
|
||||
return get;
|
||||
})();
|
||||
var default_9 = (function () {
|
||||
function default_9() {
|
||||
var yield = (function () {
|
||||
function yield() {
|
||||
}
|
||||
return default_9;
|
||||
return yield;
|
||||
})();
|
||||
yield;
|
||||
{ }
|
||||
var declare = (function () {
|
||||
function declare() {
|
||||
}
|
||||
|
||||
@@ -1,11 +1,35 @@
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts(4,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts(4,5): error TS2304: Cannot find name 'public'.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts(4,12): error TS1005: ';' expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts(4,16): error TS1146: Declaration expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts(4,17): error TS2304: Cannot find name 'get'.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts(4,21): error TS1005: ';' expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts(4,21): error TS2304: Cannot find name 'accessor'.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts(4,32): error TS1005: ';' expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts(5,1): error TS1128: Declaration or statement expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts (1 errors) ====
|
||||
==== tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor3.ts (9 errors) ====
|
||||
declare function dec<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
|
||||
class C {
|
||||
public @dec get accessor() { return 1; }
|
||||
~~~~~~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
}
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'public'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
|
||||
!!! error TS1146: Declaration expected.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'get'.
|
||||
~~~~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'accessor'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
@@ -6,24 +6,14 @@ class C {
|
||||
}
|
||||
|
||||
//// [decoratorOnClassAccessor3.js]
|
||||
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
|
||||
switch (arguments.length) {
|
||||
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
|
||||
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
|
||||
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
|
||||
}
|
||||
};
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
Object.defineProperty(C.prototype, "accessor", {
|
||||
get: function () { return 1; },
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(C.prototype, "accessor",
|
||||
__decorate([
|
||||
dec
|
||||
], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor")));
|
||||
return C;
|
||||
})();
|
||||
public;
|
||||
get;
|
||||
accessor();
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,44 @@
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,5): error TS2304: Cannot find name 'public'.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,12): error TS1005: ';' expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,16): error TS1146: Declaration expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,17): error TS2304: Cannot find name 'set'.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,21): error TS1005: ';' expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,21): error TS2304: Cannot find name 'accessor'.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,30): error TS2304: Cannot find name 'value'.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,35): error TS1005: ',' expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,37): error TS2304: Cannot find name 'number'.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(4,45): error TS1005: ';' expected.
|
||||
tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts(5,1): error TS1128: Declaration or statement expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts (1 errors) ====
|
||||
==== tests/cases/conformance/decorators/class/accessor/decoratorOnClassAccessor6.ts (12 errors) ====
|
||||
declare function dec<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
|
||||
class C {
|
||||
public @dec set accessor(value: number) { }
|
||||
~~~~~~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
}
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'public'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
|
||||
!!! error TS1146: Declaration expected.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'set'.
|
||||
~~~~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'accessor'.
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'value'.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'number'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
@@ -6,24 +6,12 @@ class C {
|
||||
}
|
||||
|
||||
//// [decoratorOnClassAccessor6.js]
|
||||
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
|
||||
switch (arguments.length) {
|
||||
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
|
||||
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
|
||||
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
|
||||
}
|
||||
};
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
Object.defineProperty(C.prototype, "accessor", {
|
||||
set: function (value) { },
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(C.prototype, "accessor",
|
||||
__decorate([
|
||||
dec
|
||||
], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor")));
|
||||
return C;
|
||||
})();
|
||||
public;
|
||||
set;
|
||||
accessor(value, number);
|
||||
{ }
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter4.ts(4,17): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter4.ts(4,24): error TS1005: ',' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter4.ts (2 errors) ====
|
||||
==== tests/cases/conformance/decorators/class/constructor/parameter/decoratorOnClassConstructorParameter4.ts (1 errors) ====
|
||||
declare function dec(target: Function, propertyKey: string | symbol, parameterIndex: number): void;
|
||||
|
||||
class C {
|
||||
constructor(public @dec p: number) {}
|
||||
~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
}
|
||||
@@ -15,7 +15,7 @@ var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.deco
|
||||
};
|
||||
var __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } };
|
||||
var C = (function () {
|
||||
function C(, p) {
|
||||
function C(public, p) {
|
||||
}
|
||||
C = __decorate([
|
||||
__param(1, dec)
|
||||
|
||||
@@ -1,11 +1,29 @@
|
||||
tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts(4,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts(4,5): error TS2304: Cannot find name 'public'.
|
||||
tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts(4,12): error TS1005: ';' expected.
|
||||
tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts(4,16): error TS1146: Declaration expected.
|
||||
tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts(4,17): error TS2304: Cannot find name 'method'.
|
||||
tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts(4,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts(5,1): error TS1128: Declaration or statement expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts (1 errors) ====
|
||||
==== tests/cases/conformance/decorators/class/method/decoratorOnClassMethod3.ts (7 errors) ====
|
||||
declare function dec<T>(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
||||
|
||||
class C {
|
||||
public @dec method() {}
|
||||
~~~~~~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
}
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'public'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
|
||||
!!! error TS1146: Declaration expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'method'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
@@ -6,20 +6,11 @@ class C {
|
||||
}
|
||||
|
||||
//// [decoratorOnClassMethod3.js]
|
||||
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
|
||||
switch (arguments.length) {
|
||||
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
|
||||
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
|
||||
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
|
||||
}
|
||||
};
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.method = function () { };
|
||||
Object.defineProperty(C.prototype, "method",
|
||||
__decorate([
|
||||
dec
|
||||
], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method")));
|
||||
return C;
|
||||
})();
|
||||
public;
|
||||
method();
|
||||
{ }
|
||||
|
||||
@@ -1,11 +1,26 @@
|
||||
tests/cases/conformance/decorators/class/property/decoratorOnClassProperty3.ts(4,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/decorators/class/property/decoratorOnClassProperty3.ts(4,5): error TS2304: Cannot find name 'public'.
|
||||
tests/cases/conformance/decorators/class/property/decoratorOnClassProperty3.ts(4,12): error TS1005: ';' expected.
|
||||
tests/cases/conformance/decorators/class/property/decoratorOnClassProperty3.ts(4,16): error TS1146: Declaration expected.
|
||||
tests/cases/conformance/decorators/class/property/decoratorOnClassProperty3.ts(4,17): error TS2304: Cannot find name 'prop'.
|
||||
tests/cases/conformance/decorators/class/property/decoratorOnClassProperty3.ts(5,1): error TS1128: Declaration or statement expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/decorators/class/property/decoratorOnClassProperty3.ts (1 errors) ====
|
||||
==== tests/cases/conformance/decorators/class/property/decoratorOnClassProperty3.ts (6 errors) ====
|
||||
declare function dec(target: any, propertyKey: string): void;
|
||||
|
||||
class C {
|
||||
public @dec prop;
|
||||
~~~~~~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
}
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'public'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
|
||||
!!! error TS1146: Declaration expected.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'prop'.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
@@ -6,18 +6,10 @@ class C {
|
||||
}
|
||||
|
||||
//// [decoratorOnClassProperty3.js]
|
||||
var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) {
|
||||
switch (arguments.length) {
|
||||
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
|
||||
case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);
|
||||
case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);
|
||||
}
|
||||
};
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
__decorate([
|
||||
dec
|
||||
], C.prototype, "prop");
|
||||
return C;
|
||||
})();
|
||||
public;
|
||||
prop;
|
||||
|
||||
@@ -1,21 +1,12 @@
|
||||
tests/cases/compiler/letAsIdentifierInStrictMode.ts(2,5): error TS1134: Variable declaration expected.
|
||||
tests/cases/compiler/letAsIdentifierInStrictMode.ts(2,9): error TS1134: Variable declaration expected.
|
||||
tests/cases/compiler/letAsIdentifierInStrictMode.ts(2,11): error TS1134: Variable declaration expected.
|
||||
tests/cases/compiler/letAsIdentifierInStrictMode.ts(3,5): error TS2300: Duplicate identifier 'a'.
|
||||
tests/cases/compiler/letAsIdentifierInStrictMode.ts(4,5): error TS1134: Variable declaration expected.
|
||||
tests/cases/compiler/letAsIdentifierInStrictMode.ts(4,7): error TS1134: Variable declaration expected.
|
||||
tests/cases/compiler/letAsIdentifierInStrictMode.ts(6,1): error TS2300: Duplicate identifier 'a'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/letAsIdentifierInStrictMode.ts (7 errors) ====
|
||||
==== tests/cases/compiler/letAsIdentifierInStrictMode.ts (4 errors) ====
|
||||
"use strict";
|
||||
var let = 10;
|
||||
~~~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
var a = 10;
|
||||
~
|
||||
!!! error TS2300: Duplicate identifier 'a'.
|
||||
|
||||
@@ -8,9 +8,7 @@ a;
|
||||
|
||||
//// [letAsIdentifierInStrictMode.js]
|
||||
"use strict";
|
||||
var ;
|
||||
var ;
|
||||
10;
|
||||
var let = 10;
|
||||
var a = 10;
|
||||
var ;
|
||||
30;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(16,7): error TS2304: Cannot find name 'NotEarlyError'.
|
||||
tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,5): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,12): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,14): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts (4 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts (2 errors) ====
|
||||
/// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
/// Ecma International makes this code available under the terms and conditions set
|
||||
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
|
||||
@@ -25,9 +23,5 @@ tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,14): error TS1
|
||||
!!! error TS2304: Cannot find name 'NotEarlyError'.
|
||||
var public = 1;
|
||||
~~~~~~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
|
||||
@@ -33,5 +33,4 @@ var public = 1;
|
||||
"use strict";
|
||||
"use strict";
|
||||
throw NotEarlyError;
|
||||
var ;
|
||||
1;
|
||||
var public = 1;
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509668.ts(3,16): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509668.ts(3,23): error TS1005: ',' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509668.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509668.ts (1 errors) ====
|
||||
class Foo3 {
|
||||
// Doesn't work, but should
|
||||
constructor (public ...args: string[]) { }
|
||||
~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~
|
||||
!!! error TS1005: ',' expected.
|
||||
}
|
||||
@@ -7,7 +7,7 @@ class Foo3 {
|
||||
//// [parser509668.js]
|
||||
var Foo3 = (function () {
|
||||
// Doesn't work, but should
|
||||
function Foo3() {
|
||||
function Foo3(public) {
|
||||
var args = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
args[_i - 1] = arguments[_i];
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser553699.ts(3,21): error TS1110: Type expected.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser553699.ts(3,21): error TS1212: Type expected. 'public' is a reserved word. Class definitions are automatically in strict mode.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser553699.ts(3,21): error TS2304: Cannot find name 'public'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser553699.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser553699.ts (2 errors) ====
|
||||
class Foo {
|
||||
constructor() { }
|
||||
public banana (x: public) { }
|
||||
~~~~~~
|
||||
!!! error TS1110: Type expected.
|
||||
!!! error TS1212: Type expected. 'public' is a reserved word. Class definitions are automatically in strict mode.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'public'.
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
@@ -12,7 +12,7 @@ class Bar {
|
||||
var Foo = (function () {
|
||||
function Foo() {
|
||||
}
|
||||
Foo.prototype.banana = function (x, ) { };
|
||||
Foo.prototype.banana = function (x) { };
|
||||
return Foo;
|
||||
})();
|
||||
var Bar = (function () {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser642331.ts(2,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser642331.ts(2,18): error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser642331.ts (1 errors) ====
|
||||
class test {
|
||||
constructor (static) { }
|
||||
~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ class test {
|
||||
|
||||
//// [parser642331.js]
|
||||
var test = (function () {
|
||||
function test() {
|
||||
function test(static) {
|
||||
}
|
||||
return test;
|
||||
})();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser642331_1.ts(4,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser642331_1.ts(4,18): error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser642331_1.ts (1 errors) ====
|
||||
@@ -7,6 +7,6 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser642331_1.ts(4,1
|
||||
class test {
|
||||
constructor (static) { }
|
||||
~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1212: Identifier expected. 'static' is a reserved word. Class definitions are automatically in strict mode.
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ class test {
|
||||
//// [parser642331_1.js]
|
||||
"use strict";
|
||||
var test = (function () {
|
||||
function test() {
|
||||
function test(static) {
|
||||
}
|
||||
return test;
|
||||
})();
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,6): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,13): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,14): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,6): error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts (3 errors) ====
|
||||
class C {
|
||||
[public ]: string;
|
||||
~~~~~~~~~
|
||||
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'public'.
|
||||
}
|
||||
@@ -1,21 +1,12 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,6): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,12): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,13): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,16): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(3,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,6): error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts (5 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts (2 errors) ====
|
||||
class C {
|
||||
[public]() { }
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
~
|
||||
!!! error TS1005: '=>' expected.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'public'.
|
||||
}
|
||||
@@ -5,5 +5,5 @@ class C {
|
||||
|
||||
//// [parserComputedPropertyName38.js]
|
||||
class C {
|
||||
[public]() { }
|
||||
}
|
||||
(() => { });
|
||||
|
||||
@@ -1,22 +1,13 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts(3,6): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts(3,12): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts(3,13): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts(3,16): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts(4,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts(3,6): error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts (5 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts (2 errors) ====
|
||||
"use strict";
|
||||
class C {
|
||||
[public]() { }
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
~
|
||||
!!! error TS1005: '=>' expected.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'public'.
|
||||
}
|
||||
@@ -7,5 +7,5 @@ class C {
|
||||
//// [parserComputedPropertyName39.js]
|
||||
"use strict";
|
||||
class C {
|
||||
[public]() { }
|
||||
}
|
||||
(() => { });
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(2,1): error TS2304: Cannot find name 'foo1'.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(3,1): error TS2304: Cannot find name 'foo1'.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(4,1): error TS2304: Cannot find name 'foo1'.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(5,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(5,8): error TS1109: Expression expected.
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(5,1): error TS1212: Identifier expected. 'static' is a reserved word in strict mode
|
||||
tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(5,1): error TS2304: Cannot find name 'static'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts (5 errors) ====
|
||||
@@ -18,6 +18,6 @@ tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(5,8):
|
||||
!!! error TS2304: Cannot find name 'foo1'.
|
||||
static();
|
||||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'static'.
|
||||
@@ -10,4 +10,4 @@ static();
|
||||
foo1();
|
||||
foo1();
|
||||
foo1();
|
||||
();
|
||||
static();
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(16,7): error TS2304: Cannot find name 'NotEarlyError'.
|
||||
tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,5): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,12): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,14): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
|
||||
|
||||
==== tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts (4 errors) ====
|
||||
==== tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts (2 errors) ====
|
||||
/// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
/// Ecma International makes this code available under the terms and conditions set
|
||||
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
|
||||
@@ -25,9 +23,5 @@ tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,14): error T
|
||||
!!! error TS2304: Cannot find name 'NotEarlyError'.
|
||||
var public = 1;
|
||||
~~~~~~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
|
||||
|
||||
@@ -33,5 +33,4 @@ var public = 1;
|
||||
"use strict";
|
||||
"use strict";
|
||||
throw NotEarlyError;
|
||||
var ;
|
||||
1;
|
||||
var public = 1;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
tests/cases/compiler/varArgConstructorMemberParameter.ts(10,18): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/varArgConstructorMemberParameter.ts(10,25): error TS1005: ',' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/varArgConstructorMemberParameter.ts (2 errors) ====
|
||||
==== tests/cases/compiler/varArgConstructorMemberParameter.ts (1 errors) ====
|
||||
class Foo1 {
|
||||
constructor (...args: string[]) { }
|
||||
}
|
||||
@@ -13,8 +12,6 @@ tests/cases/compiler/varArgConstructorMemberParameter.ts(10,25): error TS1005: '
|
||||
|
||||
class Foo3 {
|
||||
constructor (public ...args: string[]) { }
|
||||
~~~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~
|
||||
!!! error TS1005: ',' expected.
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ var Foo2 = (function () {
|
||||
return Foo2;
|
||||
})();
|
||||
var Foo3 = (function () {
|
||||
function Foo3() {
|
||||
function Foo3(public) {
|
||||
var args = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
args[_i - 1] = arguments[_i];
|
||||
|
||||
Reference in New Issue
Block a user