15 lines
No EOL
610 B
Text
15 lines
No EOL
610 B
Text
==== tests/cases/compiler/interfacePropertiesWithSameName3.ts (2 errors) ====
|
|
interface D { a: number; }
|
|
interface E { a: string; }
|
|
interface F extends E, D { } // error
|
|
~
|
|
!!! Interface 'F' cannot simultaneously extend types 'E' and 'D':
|
|
!!! Named properties 'a' of types 'E' and 'D' are not identical.
|
|
|
|
class D2 { a: number; }
|
|
class E2 { a: string; }
|
|
interface F2 extends E2, D2 { } // error
|
|
~~
|
|
!!! Interface 'F2' cannot simultaneously extend types 'E2' and 'D2':
|
|
!!! Named properties 'a' of types 'E2' and 'D2' are not identical.
|
|
|