TypeScript/tests/baselines/reference/typeParameterUsedAsTypeParameterConstraint3.js
Cyrus Najmabadi 5a7500ca5e Add a dedicated 'EndOfFile' token to a SourceFile.
This is important for incremental parsing, as it is where we can attach parse errors at the end of
the file to.  Also, it helps with things like emitting comments at the end of the file.
2014-12-02 16:09:41 -08:00

68 lines
1.3 KiB
TypeScript

//// [typeParameterUsedAsTypeParameterConstraint3.ts]
// Type parameters are in scope in their own and other type parameter lists
// Object types
//class C<T, U extends T, V extends U> {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T {
// var r: T;
// return x;
// }
//}
//class C2<V extends U, T, U extends T> {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T {
// var r: T;
// return x;
// }
//}
interface I<T, U, V> {
x: T;
y: U;
z: V;
foo<W extends V>(x: W): T;
}
interface I2<V, T, U> {
x: T;
y: U;
z: V;
foo<W extends V>(x: W): T;
}
//interface I < T, U extends T, V extends U > {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T;
//}
//interface I2<V extends U, T, U extends T> {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T;
//}
//// [typeParameterUsedAsTypeParameterConstraint3.js]
// Type parameters are in scope in their own and other type parameter lists
// Object types
//interface I < T, U extends T, V extends U > {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T;
//}
//interface I2<V extends U, T, U extends T> {
// x: T;
// y: U;
// z: V;
// foo<W extends V>(x: W): T;
//}