43 lines
1.1 KiB
Text
43 lines
1.1 KiB
Text
=== tests/cases/compiler/instantiatedReturnTypeContravariance.ts ===
|
|
interface B<T> {
|
|
>B : Symbol(B, Decl(instantiatedReturnTypeContravariance.ts, 0, 0))
|
|
>T : Symbol(T, Decl(instantiatedReturnTypeContravariance.ts, 0, 12))
|
|
|
|
name: string;
|
|
>name : Symbol(name, Decl(instantiatedReturnTypeContravariance.ts, 0, 16))
|
|
|
|
x(): T;
|
|
>x : Symbol(x, Decl(instantiatedReturnTypeContravariance.ts, 2, 13))
|
|
>T : Symbol(T, Decl(instantiatedReturnTypeContravariance.ts, 0, 12))
|
|
|
|
}
|
|
|
|
class c {
|
|
>c : Symbol(c, Decl(instantiatedReturnTypeContravariance.ts, 6, 1))
|
|
|
|
foo(): B<void> {
|
|
>foo : Symbol(foo, Decl(instantiatedReturnTypeContravariance.ts, 8, 9))
|
|
>B : Symbol(B, Decl(instantiatedReturnTypeContravariance.ts, 0, 0))
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class d extends c {
|
|
>d : Symbol(d, Decl(instantiatedReturnTypeContravariance.ts, 16, 1))
|
|
>c : Symbol(c, Decl(instantiatedReturnTypeContravariance.ts, 6, 1))
|
|
|
|
foo(): B<number> {
|
|
>foo : Symbol(foo, Decl(instantiatedReturnTypeContravariance.ts, 18, 19))
|
|
>B : Symbol(B, Decl(instantiatedReturnTypeContravariance.ts, 0, 0))
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|