File: interfacePropertiesWithSameName3.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
tests/cases/compiler/interfacePropertiesWithSameName3.ts(3,11): error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D'.
  Named property 'a' of types 'E' and 'D' are not identical.
tests/cases/compiler/interfacePropertiesWithSameName3.ts(7,11): error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2'.
  Named property 'a' of types 'E2' and 'D2' are not identical.


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