47 lines
2.4 KiB
Text
47 lines
2.4 KiB
Text
=== tests/cases/compiler/contextualTypingOfConditionalExpression.ts ===
|
|
var x: (a: number) => void = true ? (a) => a.toExponential() : (b) => b.toFixed();
|
|
>x : Symbol(x, Decl(contextualTypingOfConditionalExpression.ts, 0, 3))
|
|
>a : Symbol(a, Decl(contextualTypingOfConditionalExpression.ts, 0, 8))
|
|
>a : Symbol(a, Decl(contextualTypingOfConditionalExpression.ts, 0, 37))
|
|
>a.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45))
|
|
>a : Symbol(a, Decl(contextualTypingOfConditionalExpression.ts, 0, 37))
|
|
>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45))
|
|
>b : Symbol(b, Decl(contextualTypingOfConditionalExpression.ts, 0, 64))
|
|
>b.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
|
|
>b : Symbol(b, Decl(contextualTypingOfConditionalExpression.ts, 0, 64))
|
|
>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
|
|
|
|
class A {
|
|
>A : Symbol(A, Decl(contextualTypingOfConditionalExpression.ts, 0, 82))
|
|
|
|
foo: number;
|
|
>foo : Symbol(foo, Decl(contextualTypingOfConditionalExpression.ts, 2, 9))
|
|
}
|
|
class B extends A {
|
|
>B : Symbol(B, Decl(contextualTypingOfConditionalExpression.ts, 4, 1))
|
|
>A : Symbol(A, Decl(contextualTypingOfConditionalExpression.ts, 0, 82))
|
|
|
|
bar: number;
|
|
>bar : Symbol(bar, Decl(contextualTypingOfConditionalExpression.ts, 5, 19))
|
|
}
|
|
class C extends A {
|
|
>C : Symbol(C, Decl(contextualTypingOfConditionalExpression.ts, 7, 1))
|
|
>A : Symbol(A, Decl(contextualTypingOfConditionalExpression.ts, 0, 82))
|
|
|
|
baz: number;
|
|
>baz : Symbol(baz, Decl(contextualTypingOfConditionalExpression.ts, 8, 19))
|
|
}
|
|
|
|
var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo;
|
|
>x2 : Symbol(x2, Decl(contextualTypingOfConditionalExpression.ts, 12, 3))
|
|
>a : Symbol(a, Decl(contextualTypingOfConditionalExpression.ts, 12, 9))
|
|
>A : Symbol(A, Decl(contextualTypingOfConditionalExpression.ts, 0, 82))
|
|
>a : Symbol(a, Decl(contextualTypingOfConditionalExpression.ts, 12, 33))
|
|
>a.foo : Symbol(A.foo, Decl(contextualTypingOfConditionalExpression.ts, 2, 9))
|
|
>a : Symbol(a, Decl(contextualTypingOfConditionalExpression.ts, 12, 33))
|
|
>foo : Symbol(A.foo, Decl(contextualTypingOfConditionalExpression.ts, 2, 9))
|
|
>b : Symbol(b, Decl(contextualTypingOfConditionalExpression.ts, 12, 48))
|
|
>b.foo : Symbol(A.foo, Decl(contextualTypingOfConditionalExpression.ts, 2, 9))
|
|
>b : Symbol(b, Decl(contextualTypingOfConditionalExpression.ts, 12, 48))
|
|
>foo : Symbol(A.foo, Decl(contextualTypingOfConditionalExpression.ts, 2, 9))
|
|
|