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.
63 lines
No EOL
2.8 KiB
Text
63 lines
No EOL
2.8 KiB
Text
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(19,14): error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
|
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(26,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(29,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(41,14): error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
|
|
|
|
|
==== tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts (6 errors) ====
|
|
module NonGeneric {
|
|
class C {
|
|
x: string;
|
|
get y() {
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
return 1;
|
|
}
|
|
set y(v) { }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
fn() { return this; }
|
|
constructor(public a: number, private b: number) { }
|
|
}
|
|
|
|
class D extends C { e: string; }
|
|
|
|
var d = new D(1, 2);
|
|
var r = d.fn();
|
|
var r2 = r.x;
|
|
var r3 = r.y;
|
|
r.y = 4;
|
|
var r6 = d.y(); // error
|
|
~~~~~
|
|
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
|
|
|
}
|
|
|
|
module Generic {
|
|
class C<T, U> {
|
|
x: T;
|
|
get y() {
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
return null;
|
|
}
|
|
set y(v: U) { }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
fn() { return this; }
|
|
constructor(public a: T, private b: U) { }
|
|
}
|
|
|
|
class D<T, U> extends C<T, U> { e: T; }
|
|
|
|
var d = new D(1, '');
|
|
var r = d.fn();
|
|
var r2 = r.x;
|
|
var r3 = r.y;
|
|
r.y = '';
|
|
var r6 = d.y(); // error
|
|
~~~~~
|
|
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
|
} |