33 lines
1.6 KiB
Text
33 lines
1.6 KiB
Text
=== tests/cases/compiler/ambiguousOverloadResolution.ts ===
|
|
class A { }
|
|
>A : Symbol(A, Decl(ambiguousOverloadResolution.ts, 0, 0))
|
|
|
|
class B extends A { x: number; }
|
|
>B : Symbol(B, Decl(ambiguousOverloadResolution.ts, 0, 11))
|
|
>A : Symbol(A, Decl(ambiguousOverloadResolution.ts, 0, 0))
|
|
>x : Symbol(x, Decl(ambiguousOverloadResolution.ts, 1, 19))
|
|
|
|
declare function f(p: A, q: B): number;
|
|
>f : Symbol(f, Decl(ambiguousOverloadResolution.ts, 1, 32), Decl(ambiguousOverloadResolution.ts, 3, 39))
|
|
>p : Symbol(p, Decl(ambiguousOverloadResolution.ts, 3, 19))
|
|
>A : Symbol(A, Decl(ambiguousOverloadResolution.ts, 0, 0))
|
|
>q : Symbol(q, Decl(ambiguousOverloadResolution.ts, 3, 24))
|
|
>B : Symbol(B, Decl(ambiguousOverloadResolution.ts, 0, 11))
|
|
|
|
declare function f(p: B, q: A): string;
|
|
>f : Symbol(f, Decl(ambiguousOverloadResolution.ts, 1, 32), Decl(ambiguousOverloadResolution.ts, 3, 39))
|
|
>p : Symbol(p, Decl(ambiguousOverloadResolution.ts, 4, 19))
|
|
>B : Symbol(B, Decl(ambiguousOverloadResolution.ts, 0, 11))
|
|
>q : Symbol(q, Decl(ambiguousOverloadResolution.ts, 4, 24))
|
|
>A : Symbol(A, Decl(ambiguousOverloadResolution.ts, 0, 0))
|
|
|
|
var x: B;
|
|
>x : Symbol(x, Decl(ambiguousOverloadResolution.ts, 6, 3))
|
|
>B : Symbol(B, Decl(ambiguousOverloadResolution.ts, 0, 11))
|
|
|
|
var t: number = f(x, x); // Not an error
|
|
>t : Symbol(t, Decl(ambiguousOverloadResolution.ts, 7, 3))
|
|
>f : Symbol(f, Decl(ambiguousOverloadResolution.ts, 1, 32), Decl(ambiguousOverloadResolution.ts, 3, 39))
|
|
>x : Symbol(x, Decl(ambiguousOverloadResolution.ts, 6, 3))
|
|
>x : Symbol(x, Decl(ambiguousOverloadResolution.ts, 6, 3))
|
|
|