TypeScript/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt
Cyrus Najmabadi f1a2e41a8a Sort diagnostics in our baseline output.
This was we don't get noisy baselines just because a different phase of the compiler reported
the diagnostic.

This helps with Yui's refactoring work to move grammar checks into the type checker.
2014-12-16 15:56:56 -08:00

60 lines
3.2 KiB
Plaintext

tests/cases/compiler/illegalSuperCallsInConstructor.ts(6,5): error TS2377: Constructors for derived classes must contain a 'super' call.
tests/cases/compiler/illegalSuperCallsInConstructor.ts(7,24): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
tests/cases/compiler/illegalSuperCallsInConstructor.ts(8,26): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
tests/cases/compiler/illegalSuperCallsInConstructor.ts(9,32): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
tests/cases/compiler/illegalSuperCallsInConstructor.ts(11,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/illegalSuperCallsInConstructor.ts(12,17): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
tests/cases/compiler/illegalSuperCallsInConstructor.ts(15,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/illegalSuperCallsInConstructor.ts(16,17): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
==== tests/cases/compiler/illegalSuperCallsInConstructor.ts (8 errors) ====
class Base {
x: string;
}
class Derived extends Base {
constructor() {
~~~~~~~~~~~~~~~
var r2 = () => super();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
var r3 = () => { super(); }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
var r4 = function () { super(); }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
var r5 = {
~~~~~~~~~~~~~~~~~~
get foo() {
~~~~~~~~~~~~~~~~~~~~~~~
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
super();
~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
return 1;
~~~~~~~~~~~~~~~~~~~~~~~~~
},
~~~~~~~~~~~~~~
set foo(v: number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
super();
~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~
!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
}
~~~~~~~~~~~~~
}
~~~~~~~~~
}
~~~~~
!!! error TS2377: Constructors for derived classes must contain a 'super' call.
}