52 lines
2.4 KiB
Text
52 lines
2.4 KiB
Text
=== tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints3.ts ===
|
|
// no errors expected
|
|
|
|
class C<T extends { length: number }> {
|
|
>C : Symbol(C, Decl(wrappedAndRecursiveConstraints3.ts, 0, 0))
|
|
>T : Symbol(T, Decl(wrappedAndRecursiveConstraints3.ts, 2, 8))
|
|
>length : Symbol(length, Decl(wrappedAndRecursiveConstraints3.ts, 2, 19))
|
|
|
|
constructor(x: T) { }
|
|
>x : Symbol(x, Decl(wrappedAndRecursiveConstraints3.ts, 3, 16))
|
|
>T : Symbol(T, Decl(wrappedAndRecursiveConstraints3.ts, 2, 8))
|
|
|
|
foo<U extends T>(x: U) {
|
|
>foo : Symbol(foo, Decl(wrappedAndRecursiveConstraints3.ts, 3, 25))
|
|
>U : Symbol(U, Decl(wrappedAndRecursiveConstraints3.ts, 4, 8))
|
|
>T : Symbol(T, Decl(wrappedAndRecursiveConstraints3.ts, 2, 8))
|
|
>x : Symbol(x, Decl(wrappedAndRecursiveConstraints3.ts, 4, 21))
|
|
>U : Symbol(U, Decl(wrappedAndRecursiveConstraints3.ts, 4, 8))
|
|
|
|
function bar<V extends U>(x: V) {
|
|
>bar : Symbol(bar, Decl(wrappedAndRecursiveConstraints3.ts, 4, 28))
|
|
>V : Symbol(V, Decl(wrappedAndRecursiveConstraints3.ts, 5, 21))
|
|
>U : Symbol(U, Decl(wrappedAndRecursiveConstraints3.ts, 4, 8))
|
|
>x : Symbol(x, Decl(wrappedAndRecursiveConstraints3.ts, 5, 34))
|
|
>V : Symbol(V, Decl(wrappedAndRecursiveConstraints3.ts, 5, 21))
|
|
|
|
return x;
|
|
>x : Symbol(x, Decl(wrappedAndRecursiveConstraints3.ts, 5, 34))
|
|
}
|
|
return bar;
|
|
>bar : Symbol(bar, Decl(wrappedAndRecursiveConstraints3.ts, 4, 28))
|
|
}
|
|
}
|
|
|
|
var c = new C({ length: 2 });
|
|
>c : Symbol(c, Decl(wrappedAndRecursiveConstraints3.ts, 12, 3))
|
|
>C : Symbol(C, Decl(wrappedAndRecursiveConstraints3.ts, 0, 0))
|
|
>length : Symbol(length, Decl(wrappedAndRecursiveConstraints3.ts, 12, 15))
|
|
|
|
var r = c.foo({ length: 3, charAt: (x: number) => { '' } });
|
|
>r : Symbol(r, Decl(wrappedAndRecursiveConstraints3.ts, 13, 3))
|
|
>c.foo : Symbol(C.foo, Decl(wrappedAndRecursiveConstraints3.ts, 3, 25))
|
|
>c : Symbol(c, Decl(wrappedAndRecursiveConstraints3.ts, 12, 3))
|
|
>foo : Symbol(C.foo, Decl(wrappedAndRecursiveConstraints3.ts, 3, 25))
|
|
>length : Symbol(length, Decl(wrappedAndRecursiveConstraints3.ts, 13, 15))
|
|
>charAt : Symbol(charAt, Decl(wrappedAndRecursiveConstraints3.ts, 13, 26))
|
|
>x : Symbol(x, Decl(wrappedAndRecursiveConstraints3.ts, 13, 36))
|
|
|
|
var r2 = r('');
|
|
>r2 : Symbol(r2, Decl(wrappedAndRecursiveConstraints3.ts, 14, 3))
|
|
>r : Symbol(r, Decl(wrappedAndRecursiveConstraints3.ts, 13, 3))
|
|
|