f1a2e41a8a
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.
45 lines
1.9 KiB
Plaintext
45 lines
1.9 KiB
Plaintext
tests/cases/compiler/superPropertyAccess1.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/compiler/superPropertyAccess1.ts(13,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
|
tests/cases/compiler/superPropertyAccess1.ts(19,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
|
tests/cases/compiler/superPropertyAccess1.ts(22,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/compiler/superPropertyAccess1.ts(24,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
|
|
|
|
|
==== tests/cases/compiler/superPropertyAccess1.ts (5 errors) ====
|
|
class C {
|
|
public foo() { }
|
|
public get x() {
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
return 1;
|
|
}
|
|
|
|
public bar() { }
|
|
}
|
|
|
|
class D extends C {
|
|
public foo() {
|
|
super.bar();
|
|
super.x; // error
|
|
~
|
|
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
|
}
|
|
|
|
constructor() {
|
|
super();
|
|
super.bar();
|
|
super.x; // error
|
|
~
|
|
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
|
}
|
|
|
|
public get y() {
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
super.bar();
|
|
super.x; // error
|
|
~
|
|
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
|
|
return 1;
|
|
}
|
|
} |