37 lines
578 B
Text
37 lines
578 B
Text
=== tests/cases/compiler/contextualTypingArrayOfLambdas.ts ===
|
|
class A {
|
|
>A : A
|
|
|
|
foo: string;
|
|
>foo : string
|
|
}
|
|
|
|
class B extends A {
|
|
>B : B
|
|
>A : A
|
|
|
|
bar: string;
|
|
>bar : string
|
|
}
|
|
|
|
class C extends A {
|
|
>C : C
|
|
>A : A
|
|
|
|
baz: string;
|
|
>baz : string
|
|
}
|
|
|
|
var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }];
|
|
>xs : ((x: A) => void)[]
|
|
>[(x: A) => { }, (x: B) => { }, (x: C) => { }] : ((x: A) => void)[]
|
|
>(x: A) => { } : (x: A) => void
|
|
>x : A
|
|
>A : A
|
|
>(x: B) => { } : (x: B) => void
|
|
>x : B
|
|
>B : B
|
|
>(x: C) => { } : (x: C) => void
|
|
>x : C
|
|
>C : C
|
|
|