1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
=== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints3.ts ===
// checking whether other types are subtypes of type parameters with constraints
function f<T extends U, U, V>(t: T, u: U, v: V) {
>f : Symbol(f, Decl(subtypesOfTypeParameterWithConstraints3.ts, 0, 0))
>T : Symbol(T, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 11))
>U : Symbol(U, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 23))
>U : Symbol(U, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 23))
>V : Symbol(V, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 26))
>t : Symbol(t, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 30))
>T : Symbol(T, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 11))
>u : Symbol(u, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 35))
>U : Symbol(U, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 23))
>v : Symbol(v, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 41))
>V : Symbol(V, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 26))
// ok
var r = true ? t : u;
>r : Symbol(r, Decl(subtypesOfTypeParameterWithConstraints3.ts, 4, 7), Decl(subtypesOfTypeParameterWithConstraints3.ts, 5, 7))
>t : Symbol(t, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 30))
>u : Symbol(u, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 35))
var r = true ? u : t;
>r : Symbol(r, Decl(subtypesOfTypeParameterWithConstraints3.ts, 4, 7), Decl(subtypesOfTypeParameterWithConstraints3.ts, 5, 7))
>u : Symbol(u, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 35))
>t : Symbol(t, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 30))
// ok
var r2 = true ? t : v;
>r2 : Symbol(r2, Decl(subtypesOfTypeParameterWithConstraints3.ts, 8, 7), Decl(subtypesOfTypeParameterWithConstraints3.ts, 9, 7))
>t : Symbol(t, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 30))
>v : Symbol(v, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 41))
var r2 = true ? v : t;
>r2 : Symbol(r2, Decl(subtypesOfTypeParameterWithConstraints3.ts, 8, 7), Decl(subtypesOfTypeParameterWithConstraints3.ts, 9, 7))
>v : Symbol(v, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 41))
>t : Symbol(t, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 30))
// ok
var r3 = true ? v : u;
>r3 : Symbol(r3, Decl(subtypesOfTypeParameterWithConstraints3.ts, 12, 7), Decl(subtypesOfTypeParameterWithConstraints3.ts, 13, 7))
>v : Symbol(v, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 41))
>u : Symbol(u, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 35))
var r3 = true ? u : v;
>r3 : Symbol(r3, Decl(subtypesOfTypeParameterWithConstraints3.ts, 12, 7), Decl(subtypesOfTypeParameterWithConstraints3.ts, 13, 7))
>u : Symbol(u, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 35))
>v : Symbol(v, Decl(subtypesOfTypeParameterWithConstraints3.ts, 2, 41))
}
|