TypeScript/tests/baselines/reference/interfaceExtendingClassWithProtecteds.errors.txt
Daniel Rosenwasser 6e77e2e810 Removed colons from diagnostic messages.
Also got rid of the 'terminalMessages' concept.
2014-10-28 00:48:58 -07:00

26 lines
1.1 KiB
Plaintext

tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts(5,11): error TS2430: Interface 'I' incorrectly extends interface 'Foo'.
Property 'x' is protected but type 'I' is not a class derived from 'Foo'.
tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts(15,10): error TS2445: Property 'x' is protected and only accessible within class 'Foo' and its subclasses.
==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts (2 errors) ====
class Foo {
protected x: string;
}
interface I extends Foo { // error
~
!!! error TS2430: Interface 'I' incorrectly extends interface 'Foo'.
!!! error TS2430: Property 'x' is protected but type 'I' is not a class derived from 'Foo'.
x: string;
}
interface I2 extends Foo {
y: string;
}
var i: I2;
var r = i.y;
var r2 = i.x; // error
~~~
!!! error TS2445: Property 'x' is protected and only accessible within class 'Foo' and its subclasses.