TypeScript/tests/baselines/reference/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.types

23 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts ===
interface I<T> {
2015-04-13 23:01:57 +02:00
>I : I<T>, Symbol(I, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 0, 0))
>T : T, Symbol(T, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 0, 12))
2014-08-15 23:33:16 +02:00
<U extends T>(u: U): U;
2015-04-13 23:01:57 +02:00
>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))
2014-08-15 23:33:16 +02:00
}
var i: I<string>;
2015-04-13 23:01:57 +02:00
>i : I<string>, Symbol(i, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 3, 3))
>I : I<T>, Symbol(I, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 0, 0))
2014-08-15 23:33:16 +02:00
var y = i(""); // y should be string
2015-04-13 23:01:57 +02:00
>y : string, Symbol(y, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 4, 3))
2014-08-15 23:33:16 +02:00
>i("") : string
2015-04-13 23:01:57 +02:00
>i : I<string>, Symbol(i, Decl(callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts, 3, 3))
2015-04-13 21:36:11 +02:00
>"" : string
2014-08-15 23:33:16 +02:00