TypeScript/tests/baselines/reference/superAccess2.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

66 lines
3.7 KiB
Plaintext

tests/cases/compiler/superAccess2.ts(7,15): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(8,17): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
tests/cases/compiler/superAccess2.ts(8,22): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(11,28): error TS2336: 'super' cannot be referenced in constructor arguments.
tests/cases/compiler/superAccess2.ts(11,33): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(11,40): error TS2336: 'super' cannot be referenced in constructor arguments.
tests/cases/compiler/superAccess2.ts(11,45): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(11,59): error TS2336: 'super' cannot be referenced in constructor arguments.
tests/cases/compiler/superAccess2.ts(11,64): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(15,19): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(17,15): error TS2339: Property 'y' does not exist on type 'P'.
tests/cases/compiler/superAccess2.ts(20,26): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(21,15): error TS2339: Property 'x' does not exist on type 'typeof P'.
==== tests/cases/compiler/superAccess2.ts (13 errors) ====
class P {
x() { }
static y() { }
}
class Q extends P {
xx = super;
~
!!! error TS1034: 'super' must be followed by an argument list or member access.
static yy = super; // error for static initializer accessing super
~~~~~
!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
~
!!! error TS1034: 'super' must be followed by an argument list or member access.
// Super is not allowed in constructor args
constructor(public z = super, zz = super, zzz = () => super) {
~~~~~
!!! error TS2336: 'super' cannot be referenced in constructor arguments.
~
!!! error TS1034: 'super' must be followed by an argument list or member access.
~~~~~
!!! error TS2336: 'super' cannot be referenced in constructor arguments.
~
!!! error TS1034: 'super' must be followed by an argument list or member access.
~~~~~
!!! error TS2336: 'super' cannot be referenced in constructor arguments.
~
!!! error TS1034: 'super' must be followed by an argument list or member access.
super();
}
foo(zz = super) {
~
!!! error TS1034: 'super' must be followed by an argument list or member access.
super.x();
super.y(); // error
~
!!! error TS2339: Property 'y' does not exist on type 'P'.
}
static bar(zz = super) {
~
!!! error TS1034: 'super' must be followed by an argument list or member access.
super.x(); // error
~
!!! error TS2339: Property 'x' does not exist on type 'typeof P'.
super.y();
}
}