2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyThatIsPrivateInBaseType.ts (2 errors) ====
|
|
|
|
class Base {
|
|
|
|
private x: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Foo extends Base { // error
|
|
|
|
~~~
|
|
|
|
!!! Interface 'Foo' incorrectly extends interface 'Base':
|
2014-09-17 19:36:32 +02:00
|
|
|
!!! Property 'x' is private in type 'Base' but not in type 'Foo'.
|
2014-07-13 01:04:16 +02:00
|
|
|
x: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Base2<T> {
|
|
|
|
private x: T;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Foo2<T> extends Base2<T> { // error
|
|
|
|
~~~~
|
|
|
|
!!! Interface 'Foo2<T>' incorrectly extends interface 'Base2<T>':
|
2014-09-17 19:36:32 +02:00
|
|
|
!!! Property 'x' is private in type 'Base2<T>' but not in type 'Foo2<T>'.
|
2014-07-13 01:04:16 +02:00
|
|
|
x: number;
|
|
|
|
}
|