2014-10-28 08:28:59 +01:00
|
|
|
tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases4.ts(19,11): error TS2320: Interface 'A<T>' cannot simultaneously extend types 'C<string>' and 'C<number>'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Named properties 'a' of types 'C<string>' and 'C<number>' are not identical.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases4.ts (1 errors) ====
|
|
|
|
// merged interfaces behave as if all extends clauses from each declaration are merged together
|
|
|
|
|
|
|
|
class C<T> {
|
|
|
|
a: T;
|
|
|
|
}
|
|
|
|
|
|
|
|
class C2<T> {
|
|
|
|
b: T;
|
|
|
|
}
|
|
|
|
|
|
|
|
class C3<T> {
|
|
|
|
c: T;
|
|
|
|
}
|
|
|
|
|
|
|
|
class C4<T> {
|
|
|
|
d: T;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface A<T> extends C<string>, C3<string> { // error
|
|
|
|
~
|
2014-10-28 08:28:59 +01:00
|
|
|
!!! error TS2320: Interface 'A<T>' cannot simultaneously extend types 'C<string>' and 'C<number>'.
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2320: Named properties 'a' of types 'C<string>' and 'C<number>' are not identical.
|
2014-07-13 01:04:16 +02:00
|
|
|
y: T;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface A<T> extends C<number>, C4<string> {
|
|
|
|
z: T;
|
|
|
|
}
|
|
|
|
|
|
|
|
class D implements A<boolean> {
|
|
|
|
a: string;
|
|
|
|
b: string;
|
|
|
|
c: string;
|
|
|
|
d: string;
|
|
|
|
y: boolean;
|
|
|
|
z: boolean;
|
|
|
|
}
|