46 lines
558 B
Text
46 lines
558 B
Text
=== tests/cases/compiler/extendAndImplementTheSameBaseType.ts ===
|
|
class C {
|
|
>C : C
|
|
|
|
foo: number
|
|
>foo : number
|
|
|
|
bar() {}
|
|
>bar : () => void
|
|
}
|
|
class D extends C implements C {
|
|
>D : D
|
|
>C : C
|
|
>C : C
|
|
|
|
baz() { }
|
|
>baz : () => void
|
|
}
|
|
|
|
var c: C;
|
|
>c : C
|
|
>C : C
|
|
|
|
var d: D = new D();
|
|
>d : D
|
|
>D : D
|
|
>new D() : D
|
|
>D : typeof D
|
|
|
|
d.bar();
|
|
>d.bar() : void
|
|
>d.bar : () => void
|
|
>d : D
|
|
>bar : () => void
|
|
|
|
d.baz();
|
|
>d.baz() : void
|
|
>d.baz : () => void
|
|
>d : D
|
|
>baz : () => void
|
|
|
|
d.foo;
|
|
>d.foo : number
|
|
>d : D
|
|
>foo : number
|
|
|