diff --git a/tests/baselines/reference/constructorStaticParamName.errors.txt b/tests/baselines/reference/constructorStaticParamName.errors.txt
index ac50edd22f1..6d5c1015f48 100644
--- a/tests/baselines/reference/constructorStaticParamName.errors.txt
+++ b/tests/baselines/reference/constructorStaticParamName.errors.txt
@@ -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.
}
\ No newline at end of file
diff --git a/tests/baselines/reference/constructorStaticParamName.js b/tests/baselines/reference/constructorStaticParamName.js
index 85b22867442..cf74aed2ebc 100644
--- a/tests/baselines/reference/constructorStaticParamName.js
+++ b/tests/baselines/reference/constructorStaticParamName.js
@@ -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;
})();
diff --git a/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt b/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt
index 4739f54397c..a5f6a74b8dd 100644
--- a/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt
+++ b/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt
@@ -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.
}
\ No newline at end of file
diff --git a/tests/baselines/reference/constructorStaticParamNameErrors.js b/tests/baselines/reference/constructorStaticParamNameErrors.js
index 0bb8985545c..43e70a8c3cf 100644
--- a/tests/baselines/reference/constructorStaticParamNameErrors.js
+++ b/tests/baselines/reference/constructorStaticParamNameErrors.js
@@ -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;
})();
diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt
index 75de7c32ebc..5d607c8f5b2 100644
--- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt
+++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt
@@ -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
///
///
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.
///
/// 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
///
///
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
///
///
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
/////
/////
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.
}
diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js
index 4fb940bc9ec..eea8367711f 100644
--- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js
+++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js
@@ -342,7 +342,6 @@ var TypeScriptAllInOne;
})(TypeScriptAllInOne || (TypeScriptAllInOne = {}));
var BasicFeatures = (function () {
function BasicFeatures() {
- this.implements = 0;
}
///
/// 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;
+ };
+ ///
+ /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally
+ ///
+ ///
+ ///
+ 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;
+ };
+ ///
+ /// Test types in ts language. Including class,struct,interface,delegate,anonymous type
+ ///
+ ///
+ 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;
+ };
+ /////
+ ///// Test different operators
+ /////
+ /////
+ 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;
-///
-/// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally
-///
-///
-///
-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 () { ; };
diff --git a/tests/baselines/reference/convertKeywordsYes.errors.txt b/tests/baselines/reference/convertKeywordsYes.errors.txt
index 932fda09be8..b558ba0b714 100644
--- a/tests/baselines/reference/convertKeywordsYes.errors.txt
+++ b/tests/baselines/reference/convertKeywordsYes.errors.txt
@@ -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 { }
}
\ No newline at end of file
diff --git a/tests/baselines/reference/convertKeywordsYes.js b/tests/baselines/reference/convertKeywordsYes.js
index 2b17e744b66..a68f751f434 100644
--- a/tests/baselines/reference/convertKeywordsYes.js
+++ b/tests/baselines/reference/convertKeywordsYes.js
@@ -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() {
}
diff --git a/tests/baselines/reference/decoratorOnClassAccessor3.errors.txt b/tests/baselines/reference/decoratorOnClassAccessor3.errors.txt
index 1a1e6503355..b75b7e0d8b6 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor3.errors.txt
+++ b/tests/baselines/reference/decoratorOnClassAccessor3.errors.txt
@@ -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(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
class C {
public @dec get accessor() { return 1; }
~~~~~~
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
- }
\ No newline at end of file
+ ~~~~~~
+!!! 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.
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClassAccessor3.js b/tests/baselines/reference/decoratorOnClassAccessor3.js
index 23e689f3114..f48a755953f 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor3.js
+++ b/tests/baselines/reference/decoratorOnClassAccessor3.js
@@ -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;
+}
diff --git a/tests/baselines/reference/decoratorOnClassAccessor6.errors.txt b/tests/baselines/reference/decoratorOnClassAccessor6.errors.txt
index f43827c0e4b..ec22ae0b3e1 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor6.errors.txt
+++ b/tests/baselines/reference/decoratorOnClassAccessor6.errors.txt
@@ -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(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
class C {
public @dec set accessor(value: number) { }
~~~~~~
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
- }
\ No newline at end of file
+ ~~~~~~
+!!! 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.
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClassAccessor6.js b/tests/baselines/reference/decoratorOnClassAccessor6.js
index 465e13ebb1d..771d937634f 100644
--- a/tests/baselines/reference/decoratorOnClassAccessor6.js
+++ b/tests/baselines/reference/decoratorOnClassAccessor6.js
@@ -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);
+{ }
diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4.errors.txt b/tests/baselines/reference/decoratorOnClassConstructorParameter4.errors.txt
index 61ff1433662..5969cfca069 100644
--- a/tests/baselines/reference/decoratorOnClassConstructorParameter4.errors.txt
+++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4.errors.txt
@@ -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.
}
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js
index 638cb1cda7e..9d2b4a690ab 100644
--- a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js
+++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js
@@ -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)
diff --git a/tests/baselines/reference/decoratorOnClassMethod3.errors.txt b/tests/baselines/reference/decoratorOnClassMethod3.errors.txt
index 2775ab9f144..b2173dedf9e 100644
--- a/tests/baselines/reference/decoratorOnClassMethod3.errors.txt
+++ b/tests/baselines/reference/decoratorOnClassMethod3.errors.txt
@@ -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(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor;
class C {
public @dec method() {}
~~~~~~
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
- }
\ No newline at end of file
+ ~~~~~~
+!!! 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.
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClassMethod3.js b/tests/baselines/reference/decoratorOnClassMethod3.js
index f93b7d7a6b2..3ac97697e80 100644
--- a/tests/baselines/reference/decoratorOnClassMethod3.js
+++ b/tests/baselines/reference/decoratorOnClassMethod3.js
@@ -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();
+{ }
diff --git a/tests/baselines/reference/decoratorOnClassProperty3.errors.txt b/tests/baselines/reference/decoratorOnClassProperty3.errors.txt
index a6321c55426..29438bd67a9 100644
--- a/tests/baselines/reference/decoratorOnClassProperty3.errors.txt
+++ b/tests/baselines/reference/decoratorOnClassProperty3.errors.txt
@@ -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.
- }
\ No newline at end of file
+ ~~~~~~
+!!! 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.
\ No newline at end of file
diff --git a/tests/baselines/reference/decoratorOnClassProperty3.js b/tests/baselines/reference/decoratorOnClassProperty3.js
index 05476c66e7d..6c9945677ca 100644
--- a/tests/baselines/reference/decoratorOnClassProperty3.js
+++ b/tests/baselines/reference/decoratorOnClassProperty3.js
@@ -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;
diff --git a/tests/baselines/reference/letAsIdentifierInStrictMode.errors.txt b/tests/baselines/reference/letAsIdentifierInStrictMode.errors.txt
index 65411f23da9..b59daca008c 100644
--- a/tests/baselines/reference/letAsIdentifierInStrictMode.errors.txt
+++ b/tests/baselines/reference/letAsIdentifierInStrictMode.errors.txt
@@ -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'.
diff --git a/tests/baselines/reference/letAsIdentifierInStrictMode.js b/tests/baselines/reference/letAsIdentifierInStrictMode.js
index ccf099bcfc4..eb840e1a641 100644
--- a/tests/baselines/reference/letAsIdentifierInStrictMode.js
+++ b/tests/baselines/reference/letAsIdentifierInStrictMode.js
@@ -8,9 +8,7 @@ a;
//// [letAsIdentifierInStrictMode.js]
"use strict";
-var ;
-var ;
-10;
+var let = 10;
var a = 10;
var ;
30;
diff --git a/tests/baselines/reference/parser10.1.1-8gs.errors.txt b/tests/baselines/reference/parser10.1.1-8gs.errors.txt
index c396c982bb8..185665d23da 100644
--- a/tests/baselines/reference/parser10.1.1-8gs.errors.txt
+++ b/tests/baselines/reference/parser10.1.1-8gs.errors.txt
@@ -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
\ No newline at end of file
diff --git a/tests/baselines/reference/parser10.1.1-8gs.js b/tests/baselines/reference/parser10.1.1-8gs.js
index 85227fab116..e7d342cf1f1 100644
--- a/tests/baselines/reference/parser10.1.1-8gs.js
+++ b/tests/baselines/reference/parser10.1.1-8gs.js
@@ -33,5 +33,4 @@ var public = 1;
"use strict";
"use strict";
throw NotEarlyError;
-var ;
-1;
+var public = 1;
diff --git a/tests/baselines/reference/parser509668.errors.txt b/tests/baselines/reference/parser509668.errors.txt
index 588bda6d91c..5ea380592ef 100644
--- a/tests/baselines/reference/parser509668.errors.txt
+++ b/tests/baselines/reference/parser509668.errors.txt
@@ -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.
}
\ No newline at end of file
diff --git a/tests/baselines/reference/parser509668.js b/tests/baselines/reference/parser509668.js
index a64c9c7b5b0..63c5d8a1a95 100644
--- a/tests/baselines/reference/parser509668.js
+++ b/tests/baselines/reference/parser509668.js
@@ -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];
diff --git a/tests/baselines/reference/parser553699.errors.txt b/tests/baselines/reference/parser553699.errors.txt
index 84bc6e60707..505bc93c338 100644
--- a/tests/baselines/reference/parser553699.errors.txt
+++ b/tests/baselines/reference/parser553699.errors.txt
@@ -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 {
diff --git a/tests/baselines/reference/parser553699.js b/tests/baselines/reference/parser553699.js
index c4cc51bf5af..8570780e74a 100644
--- a/tests/baselines/reference/parser553699.js
+++ b/tests/baselines/reference/parser553699.js
@@ -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 () {
diff --git a/tests/baselines/reference/parser642331.errors.txt b/tests/baselines/reference/parser642331.errors.txt
index fad38e66513..5586cf6754f 100644
--- a/tests/baselines/reference/parser642331.errors.txt
+++ b/tests/baselines/reference/parser642331.errors.txt
@@ -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.
}
\ No newline at end of file
diff --git a/tests/baselines/reference/parser642331.js b/tests/baselines/reference/parser642331.js
index 3d88c096af3..056ea7dd384 100644
--- a/tests/baselines/reference/parser642331.js
+++ b/tests/baselines/reference/parser642331.js
@@ -6,7 +6,7 @@ class test {
//// [parser642331.js]
var test = (function () {
- function test() {
+ function test(static) {
}
return test;
})();
diff --git a/tests/baselines/reference/parser642331_1.errors.txt b/tests/baselines/reference/parser642331_1.errors.txt
index c31cd9c5653..02674121ac9 100644
--- a/tests/baselines/reference/parser642331_1.errors.txt
+++ b/tests/baselines/reference/parser642331_1.errors.txt
@@ -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.
}
\ No newline at end of file
diff --git a/tests/baselines/reference/parser642331_1.js b/tests/baselines/reference/parser642331_1.js
index d4de3c04d1d..83833ee6612 100644
--- a/tests/baselines/reference/parser642331_1.js
+++ b/tests/baselines/reference/parser642331_1.js
@@ -9,7 +9,7 @@ class test {
//// [parser642331_1.js]
"use strict";
var test = (function () {
- function test() {
+ function test(static) {
}
return test;
})();
diff --git a/tests/baselines/reference/parserComputedPropertyName36.errors.txt b/tests/baselines/reference/parserComputedPropertyName36.errors.txt
index 8c647be13c9..a6fa988ec32 100644
--- a/tests/baselines/reference/parserComputedPropertyName36.errors.txt
+++ b/tests/baselines/reference/parserComputedPropertyName36.errors.txt
@@ -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'.
}
\ No newline at end of file
diff --git a/tests/baselines/reference/parserComputedPropertyName38.errors.txt b/tests/baselines/reference/parserComputedPropertyName38.errors.txt
index 28daf322748..807b91cd3e5 100644
--- a/tests/baselines/reference/parserComputedPropertyName38.errors.txt
+++ b/tests/baselines/reference/parserComputedPropertyName38.errors.txt
@@ -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.
\ No newline at end of file
+!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
+ ~~~~~~
+!!! error TS2304: Cannot find name 'public'.
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/parserComputedPropertyName38.js b/tests/baselines/reference/parserComputedPropertyName38.js
index e47f5233a77..822695e5cfd 100644
--- a/tests/baselines/reference/parserComputedPropertyName38.js
+++ b/tests/baselines/reference/parserComputedPropertyName38.js
@@ -5,5 +5,5 @@ class C {
//// [parserComputedPropertyName38.js]
class C {
+ [public]() { }
}
-(() => { });
diff --git a/tests/baselines/reference/parserComputedPropertyName39.errors.txt b/tests/baselines/reference/parserComputedPropertyName39.errors.txt
index 32d59ad2403..766ae402491 100644
--- a/tests/baselines/reference/parserComputedPropertyName39.errors.txt
+++ b/tests/baselines/reference/parserComputedPropertyName39.errors.txt
@@ -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.
\ No newline at end of file
+!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode
+ ~~~~~~
+!!! error TS2304: Cannot find name 'public'.
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/parserComputedPropertyName39.js b/tests/baselines/reference/parserComputedPropertyName39.js
index 541d1965385..8e2c4853bd3 100644
--- a/tests/baselines/reference/parserComputedPropertyName39.js
+++ b/tests/baselines/reference/parserComputedPropertyName39.js
@@ -7,5 +7,5 @@ class C {
//// [parserComputedPropertyName39.js]
"use strict";
class C {
+ [public]() { }
}
-(() => { });
diff --git a/tests/baselines/reference/parserStrictMode2.errors.txt b/tests/baselines/reference/parserStrictMode2.errors.txt
index e920c02bed1..464e8eface8 100644
--- a/tests/baselines/reference/parserStrictMode2.errors.txt
+++ b/tests/baselines/reference/parserStrictMode2.errors.txt
@@ -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.
\ No newline at end of file
+!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode
+ ~~~~~~
+!!! error TS2304: Cannot find name 'static'.
\ No newline at end of file
diff --git a/tests/baselines/reference/parserStrictMode2.js b/tests/baselines/reference/parserStrictMode2.js
index b8020672241..79b32ed9a58 100644
--- a/tests/baselines/reference/parserStrictMode2.js
+++ b/tests/baselines/reference/parserStrictMode2.js
@@ -10,4 +10,4 @@ static();
foo1();
foo1();
foo1();
-();
+static();
diff --git a/tests/baselines/reference/scanner10.1.1-8gs.errors.txt b/tests/baselines/reference/scanner10.1.1-8gs.errors.txt
index 2cfe3b3080a..54cd92dc0ca 100644
--- a/tests/baselines/reference/scanner10.1.1-8gs.errors.txt
+++ b/tests/baselines/reference/scanner10.1.1-8gs.errors.txt
@@ -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
\ No newline at end of file
diff --git a/tests/baselines/reference/scanner10.1.1-8gs.js b/tests/baselines/reference/scanner10.1.1-8gs.js
index ed0deac165d..90a0cf8be9f 100644
--- a/tests/baselines/reference/scanner10.1.1-8gs.js
+++ b/tests/baselines/reference/scanner10.1.1-8gs.js
@@ -33,5 +33,4 @@ var public = 1;
"use strict";
"use strict";
throw NotEarlyError;
-var ;
-1;
+var public = 1;
diff --git a/tests/baselines/reference/varArgConstructorMemberParameter.errors.txt b/tests/baselines/reference/varArgConstructorMemberParameter.errors.txt
index 19bd0396bed..e3257b870d6 100644
--- a/tests/baselines/reference/varArgConstructorMemberParameter.errors.txt
+++ b/tests/baselines/reference/varArgConstructorMemberParameter.errors.txt
@@ -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.
}
diff --git a/tests/baselines/reference/varArgConstructorMemberParameter.js b/tests/baselines/reference/varArgConstructorMemberParameter.js
index 100a4b07899..7f1ef8d5b3a 100644
--- a/tests/baselines/reference/varArgConstructorMemberParameter.js
+++ b/tests/baselines/reference/varArgConstructorMemberParameter.js
@@ -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];