86 lines
3.3 KiB
Text
86 lines
3.3 KiB
Text
=== tests/cases/conformance/types/typeParameters/typeParameterLists/innerTypeParameterShadowingOuterOne2.ts ===
|
|
// inner type parameters shadow outer ones of the same name
|
|
// no errors expected
|
|
|
|
class C<T extends Date> {
|
|
>C : Symbol(C, Decl(innerTypeParameterShadowingOuterOne2.ts, 0, 0))
|
|
>T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 3, 8))
|
|
>Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
|
|
|
|
g<T extends Number>() {
|
|
>g : Symbol(g, Decl(innerTypeParameterShadowingOuterOne2.ts, 3, 25))
|
|
>T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 4, 6))
|
|
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
|
|
|
var x: T;
|
|
>x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 5, 11))
|
|
>T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 4, 6))
|
|
|
|
x.toFixed();
|
|
>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
|
|
>x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 5, 11))
|
|
>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
|
|
}
|
|
|
|
h() {
|
|
>h : Symbol(h, Decl(innerTypeParameterShadowingOuterOne2.ts, 7, 5))
|
|
|
|
var x: T;
|
|
>x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 10, 11))
|
|
>T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 3, 8))
|
|
|
|
x.getDate();
|
|
>x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26))
|
|
>x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 10, 11))
|
|
>getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26))
|
|
}
|
|
}
|
|
|
|
class C2<T extends Date, U extends Date> {
|
|
>C2 : Symbol(C2, Decl(innerTypeParameterShadowingOuterOne2.ts, 13, 1))
|
|
>T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 15, 9))
|
|
>Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
|
|
>U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne2.ts, 15, 24))
|
|
>Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
|
|
|
|
g<T extends Number, U extends Number>() {
|
|
>g : Symbol(g, Decl(innerTypeParameterShadowingOuterOne2.ts, 15, 42))
|
|
>T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 16, 6))
|
|
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
|
>U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne2.ts, 16, 23))
|
|
>Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11))
|
|
|
|
var x: U;
|
|
>x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 17, 11))
|
|
>U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne2.ts, 16, 23))
|
|
|
|
x.toFixed();
|
|
>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
|
|
>x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 17, 11))
|
|
>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37))
|
|
}
|
|
|
|
h() {
|
|
>h : Symbol(h, Decl(innerTypeParameterShadowingOuterOne2.ts, 19, 5))
|
|
|
|
var x: U;
|
|
>x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 22, 11))
|
|
>U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne2.ts, 15, 24))
|
|
|
|
x.getDate();
|
|
>x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26))
|
|
>x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 22, 11))
|
|
>getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26))
|
|
}
|
|
}
|
|
//class C2<T extends Date, U extends T> {
|
|
// g<T extends Number, U extends T>() {
|
|
// var x: U;
|
|
// x.toFixed();
|
|
// }
|
|
|
|
// h() {
|
|
// var x: U;
|
|
// x.getDate();
|
|
// }
|
|
//}
|