TypeScript/tests/baselines/reference/superCallOutsideConstructor.errors.txt

34 lines
1.3 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/superCallOutsideConstructor.ts(6,9): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
tests/cases/compiler/superCallOutsideConstructor.ts(12,13): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
tests/cases/compiler/superCallOutsideConstructor.ts(16,13): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/superCallOutsideConstructor.ts (3 errors) ====
class C {
foo() { }
}
class D extends C {
x = super();
~~~~~
!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
2014-07-13 01:04:16 +02:00
constructor() {
super();
var y = () => {
super();
~~~~~
!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
2014-07-13 01:04:16 +02:00
}
var y2 = function() {
super();
~~~~~
!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors
2014-07-13 01:04:16 +02:00
}
}
}
var d = new D();