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