TypeScript/tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClassWithProtecteds.ts
2014-09-19 14:01:07 -07:00

15 lines
No EOL
198 B
TypeScript

class Foo {
protected x: string;
}
interface I extends Foo { // error
x: string;
}
interface I2 extends Foo {
y: string;
}
var i: I2;
var r = i.y;
var r2 = i.x; // error