TypeScript/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types
2015-04-13 14:29:37 -07:00

23 lines
1.3 KiB
Plaintext

=== tests/cases/compiler/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts ===
interface I<T> {
>I : I<T>, Symbol(I, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 0, 0))
>T : T, Symbol(T, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 0, 12))
<U extends T>(u: U): U;
>U : U, Symbol(U, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 1, 5))
>T : T, Symbol(T, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 0, 12))
>u : U, Symbol(u, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 1, 18))
>U : U, Symbol(U, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 1, 5))
>U : U, Symbol(U, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 1, 5))
}
var i: I<string>;
>i : I<string>, Symbol(i, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 3, 3))
>I : I<T>, Symbol(I, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 0, 0))
var y = i(""); // y should be string
>y : string, Symbol(y, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 4, 3))
>i("") : string
>i : I<string>, Symbol(i, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 3, 3))
>"" : string