55 lines
1.6 KiB
Text
55 lines
1.6 KiB
Text
=== tests/cases/compiler/hidingConstructSignatures.ts ===
|
|
interface C {
|
|
>C : Symbol(C, Decl(hidingConstructSignatures.ts, 0, 0))
|
|
|
|
(a: string): string;
|
|
>a : Symbol(a, Decl(hidingConstructSignatures.ts, 1, 5))
|
|
}
|
|
|
|
interface D extends C {
|
|
>D : Symbol(D, Decl(hidingConstructSignatures.ts, 2, 1))
|
|
>C : Symbol(C, Decl(hidingConstructSignatures.ts, 0, 0))
|
|
|
|
new (a: string): number; // Should be ok
|
|
>a : Symbol(a, Decl(hidingConstructSignatures.ts, 5, 9))
|
|
}
|
|
|
|
interface E {
|
|
>E : Symbol(E, Decl(hidingConstructSignatures.ts, 6, 1))
|
|
|
|
new (a: string): {};
|
|
>a : Symbol(a, Decl(hidingConstructSignatures.ts, 9, 9))
|
|
}
|
|
|
|
interface F extends E {
|
|
>F : Symbol(F, Decl(hidingConstructSignatures.ts, 10, 1))
|
|
>E : Symbol(E, Decl(hidingConstructSignatures.ts, 6, 1))
|
|
|
|
new (a: string): string;
|
|
>a : Symbol(a, Decl(hidingConstructSignatures.ts, 13, 9))
|
|
}
|
|
|
|
var d: D;
|
|
>d : Symbol(d, Decl(hidingConstructSignatures.ts, 16, 3))
|
|
>D : Symbol(D, Decl(hidingConstructSignatures.ts, 2, 1))
|
|
|
|
d(""); // string
|
|
>d : Symbol(d, Decl(hidingConstructSignatures.ts, 16, 3))
|
|
|
|
new d(""); // should be number
|
|
>d : Symbol(d, Decl(hidingConstructSignatures.ts, 16, 3))
|
|
|
|
var f: F;
|
|
>f : Symbol(f, Decl(hidingConstructSignatures.ts, 20, 3))
|
|
>F : Symbol(F, Decl(hidingConstructSignatures.ts, 10, 1))
|
|
|
|
new f(""); // string
|
|
>f : Symbol(f, Decl(hidingConstructSignatures.ts, 20, 3))
|
|
|
|
var e: E;
|
|
>e : Symbol(e, Decl(hidingConstructSignatures.ts, 23, 3))
|
|
>E : Symbol(E, Decl(hidingConstructSignatures.ts, 6, 1))
|
|
|
|
new e(""); // {}
|
|
>e : Symbol(e, Decl(hidingConstructSignatures.ts, 23, 3))
|
|
|