Update baselines

This commit is contained in:
Kanchalai Tanglertsampan
2016-01-26 15:37:19 -08:00
parent c084cfffc7
commit 6b68b31357
16 changed files with 104 additions and 116 deletions

View File

@@ -1,18 +1,15 @@
tests/cases/compiler/baseCheck.ts(9,18): error TS2304: Cannot find name 'loc'.
tests/cases/compiler/baseCheck.ts(17,53): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/compiler/baseCheck.ts(17,59): error TS2332: 'this' cannot be referenced in current location.
tests/cases/compiler/baseCheck.ts(17,59): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/baseCheck.ts(18,62): error TS2332: 'this' cannot be referenced in current location.
tests/cases/compiler/baseCheck.ts(18,62): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/baseCheck.ts(17,59): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/baseCheck.ts(18,62): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/baseCheck.ts(19,59): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
tests/cases/compiler/baseCheck.ts(19,68): error TS2332: 'this' cannot be referenced in current location.
tests/cases/compiler/baseCheck.ts(19,68): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/baseCheck.ts(19,68): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/baseCheck.ts(22,9): error TS2304: Cannot find name 'x'.
tests/cases/compiler/baseCheck.ts(23,7): error TS2304: Cannot find name 'x'.
tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'.
==== tests/cases/compiler/baseCheck.ts (12 errors) ====
==== tests/cases/compiler/baseCheck.ts (9 errors) ====
class C { constructor(x: number, y: number) { } }
class ELoc extends C {
constructor(x: number) {
@@ -35,21 +32,15 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'.
~~~~~~~~~~~~~
!!! error TS2346: Supplied parameters do not match any signature of call target.
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
class E extends C { constructor(public z: number) { super(0, this.z) } }
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type
~~~~~~~
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
function f() {
if (x<10) {

View File

@@ -4,7 +4,7 @@ tests/cases/compiler/bases.ts(7,17): error TS2304: Cannot find name 'any'.
tests/cases/compiler/bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'.
Property 'x' is missing in type 'C'.
tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call.
tests/cases/compiler/bases.ts(13,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/bases.ts(13,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'.
tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected.
tests/cases/compiler/bases.ts(13,17): error TS2304: Cannot find name 'any'.
@@ -38,7 +38,7 @@ tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist o
this.x: any;
~~~~~~~~~~~~~~~~~~~~
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
~
!!! error TS2339: Property 'x' does not exist on type 'C'.
~

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(5,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(5,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts (1 errors) ====
@@ -8,7 +8,7 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing2.ts(5,9): error TS17008:
constructor() {
this.x = 100;
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
super();
this.x = 10;
var that = this;

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts (1 errors) ====
@@ -8,6 +8,6 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing5.ts(5,15): error TS17008:
constructor() {
super(this.x);
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(7,20): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(7,20): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts (1 errors) ====
@@ -10,7 +10,7 @@ tests/cases/compiler/checkSuperCallBeforeThisAccessing8.ts(7,20): error TS17008:
constructor() {
var that = this;
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
super();
}
}

View File

@@ -1,11 +1,11 @@
tests/cases/compiler/classUpdateTests.ts(34,2): error TS2377: Constructors for derived classes must contain a 'super' call.
tests/cases/compiler/classUpdateTests.ts(43,18): error TS2335: 'super' can only be referenced in a derived class.
tests/cases/compiler/classUpdateTests.ts(59,3): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/compiler/classUpdateTests.ts(57,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/compiler/classUpdateTests.ts(63,7): error TS2415: Class 'L' incorrectly extends base class 'G'.
Property 'p1' is private in type 'L' but not in type 'G'.
tests/cases/compiler/classUpdateTests.ts(69,7): error TS2415: Class 'M' incorrectly extends base class 'G'.
Property 'p1' is private in type 'M' but not in type 'G'.
tests/cases/compiler/classUpdateTests.ts(72,3): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/compiler/classUpdateTests.ts(70,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/compiler/classUpdateTests.ts(93,3): error TS1128: Declaration or statement expected.
tests/cases/compiler/classUpdateTests.ts(95,1): error TS1128: Declaration or statement expected.
tests/cases/compiler/classUpdateTests.ts(99,3): error TS1128: Declaration or statement expected.
@@ -80,11 +80,14 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st
class K extends G {
constructor(public p1:number) { // ERROR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var i = 0;
~~~~~~~~~~~~
super();
~~~~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
~~~~~~~~~~
}
~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
}
class L extends G {
@@ -101,11 +104,14 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st
!!! error TS2415: Class 'M' incorrectly extends base class 'G'.
!!! error TS2415: Property 'p1' is private in type 'M' but not in type 'G'.
constructor(private p1:number) { // ERROR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var i = 0;
~~~~~~~~~~~~
super();
~~~~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
~~~~~~~~~~
}
~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
}
//

View File

@@ -1,12 +1,12 @@
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(17,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(32,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(47,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(57,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(58,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(59,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(80,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(81,9): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(82,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(15,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(30,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(47,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(56,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(57,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(58,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(79,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(80,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts(81,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassParameterProperties.ts (9 errors) ====
@@ -25,11 +25,14 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP
class Derived2 extends Base {
constructor(public y: string) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var a = 1;
~~~~~~~~~~~~~~~~~~
super(); // error
~~~~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
}
class Derived3 extends Base {
@@ -42,11 +45,14 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP
class Derived4 extends Base {
a = 1;
constructor(y: string) {
~~~~~~~~~~~~~~~~~~~~~~~~
var b = 2;
~~~~~~~~~~~~~~~~~~
super(); // error
~~~~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
}
class Derived5 extends Base {
@@ -62,7 +68,7 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP
constructor(y: string) {
this.a = 1;
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
var b = 2;
super(); // error: "super" has to be called before "this" accessing
}
@@ -72,16 +78,20 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP
a = 1;
b: number;
constructor(y: string) {
~~~~~~~~~~~~~~~~~~~~~~~~
this.a = 3;
~~~~~~~~~~~~~~~~~~~
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
this.b = 3;
~~~~~~~~~~~~~~~~~~~
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
super(); // error
~~~~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
}
class Derived8 extends Base {
@@ -101,16 +111,20 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassP
a = 1;
b: number;
constructor(y: string) {
~~~~~~~~~~~~~~~~~~~~~~~~
this.a = 3;
~~~~~~~~~~~~~~~~~~~
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
this.b = 3;
~~~~~~~~~~~~~~~~~~~
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
super(); // error
~~~~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
}
class Derived10<T> extends Base2<T> {

View File

@@ -1,10 +1,8 @@
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS2332: 'this' cannot be referenced in current location.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(20,21): error TS2332: 'this' cannot be referenced in current location.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(8,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (4 errors) ====
==== tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassSuperCallsWithThisArg.ts (2 errors) ====
class Base {
x: string;
constructor(a) { }
@@ -14,7 +12,7 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS
constructor() {
super(this); // ok
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}
@@ -22,17 +20,13 @@ tests/cases/conformance/classes/constructorDeclarations/superCalls/derivedClassS
constructor(public a: string) {
super(this); // error
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}
class Derived3 extends Base {
constructor(public a: string) {
super(() => this); // error
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
}
}

View File

@@ -1,4 +1,4 @@
tests/cases/compiler/strictModeInConstructor.ts(29,9): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
tests/cases/compiler/strictModeInConstructor.ts(27,5): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
==== tests/cases/compiler/strictModeInConstructor.ts (1 errors) ====
@@ -29,12 +29,16 @@ tests/cases/compiler/strictModeInConstructor.ts(29,9): error TS2376: A 'super' c
public s: number = 9;
constructor () {
~~~~~~~~~~~~~~~~
var x = 1; // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~
super();
~~~~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
~~~~~~~~~~~~~~~~
"use strict";
~~~~~~~~~~~~~~~~~~~~~
}
~~~~~
!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
}
class Bs extends A {

View File

@@ -1,7 +1,6 @@
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS2332: 'this' cannot be referenced in current location.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(38,25): error TS2507: Type 'any' is not a constructor function type.
@@ -9,7 +8,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(44,9):
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): error TS2332: 'this' cannot be referenced in current location.
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (9 errors) ====
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts (8 errors) ====
//'this' in static member initializer
class ErrClass1 {
static t = this; // Error
@@ -27,7 +26,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9):
constructor() {
super(this); // Error
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}
@@ -37,9 +36,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9):
constructor() {
super(this); // Error
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}

View File

@@ -1,7 +1,6 @@
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS2332: 'this' cannot be referenced in current location.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(36,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface.
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(38,25): error TS2507: Type 'any' is not a constructor function type.
@@ -10,7 +9,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (10 errors) ====
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (9 errors) ====
//'this' in static member initializer
class ErrClass1 {
static t = this; // Error
@@ -28,7 +27,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod
constructor() {
super(this); // error: "super" has to be called before "this" accessing
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}
@@ -38,9 +37,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod
constructor() {
super(this); // Error
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}

View File

@@ -1,11 +1,9 @@
tests/cases/compiler/thisInSuperCall.ts(7,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall.ts(14,15): error TS2332: 'this' cannot be referenced in current location.
tests/cases/compiler/thisInSuperCall.ts(14,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall.ts(20,15): error TS2332: 'this' cannot be referenced in current location.
tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall.ts(7,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall.ts(14,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== tests/cases/compiler/thisInSuperCall.ts (5 errors) ====
==== tests/cases/compiler/thisInSuperCall.ts (3 errors) ====
class Base {
constructor(x: any) {}
}
@@ -14,7 +12,7 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17008: 'super' must be c
constructor() {
super(this); // error: "super" has to be called before "this" accessing
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}
@@ -23,9 +21,7 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17008: 'super' must be c
constructor() {
super(this); // error
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}
@@ -33,8 +29,6 @@ tests/cases/compiler/thisInSuperCall.ts(20,15): error TS17008: 'super' must be c
constructor(public p) {
super(this); // error
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}

View File

@@ -1,8 +1,7 @@
tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS2332: 'this' cannot be referenced in current location.
tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== tests/cases/compiler/thisInSuperCall1.ts (2 errors) ====
==== tests/cases/compiler/thisInSuperCall1.ts (1 errors) ====
class Base {
constructor(a: any) {}
}
@@ -11,9 +10,7 @@ tests/cases/compiler/thisInSuperCall1.ts(7,15): error TS17008: 'super' must be c
constructor(public x: number) {
super(this);
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}

View File

@@ -1,9 +1,8 @@
tests/cases/compiler/thisInSuperCall2.ts(8,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS2332: 'this' cannot be referenced in current location.
tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall2.ts(8,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== tests/cases/compiler/thisInSuperCall2.ts (3 errors) ====
==== tests/cases/compiler/thisInSuperCall2.ts (2 errors) ====
class Base {
constructor(a: any) {}
}
@@ -13,7 +12,7 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17008: 'super' must be
constructor() {
super(this); // error: "super" has to be called before "this" accessing
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}
@@ -23,9 +22,7 @@ tests/cases/compiler/thisInSuperCall2.ts(16,15): error TS17008: 'super' must be
constructor() {
super(this); // error
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}

View File

@@ -1,8 +1,7 @@
tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS2332: 'this' cannot be referenced in current location.
tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
==== tests/cases/compiler/thisInSuperCall3.ts (2 errors) ====
==== tests/cases/compiler/thisInSuperCall3.ts (1 errors) ====
class Base {
constructor(a: any) {}
}
@@ -13,9 +12,7 @@ tests/cases/compiler/thisInSuperCall3.ts(9,15): error TS17008: 'super' must be c
constructor() {
super(this);
~~~~
!!! error TS2332: 'this' cannot be referenced in current location.
~~~~
!!! error TS17008: 'super' must be called before accessing 'this' in the constructor of a derived class.
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
}
}