mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
16 lines
244 B
TypeScript
16 lines
244 B
TypeScript
// no errors expected
|
|
|
|
class C<T extends Date> {
|
|
constructor(public data: T) { }
|
|
foo<U extends T>(x: U) {
|
|
return x;
|
|
}
|
|
}
|
|
|
|
interface Foo extends Date {
|
|
foo: string;
|
|
}
|
|
|
|
var y: Foo = null;
|
|
var c = new C(y);
|
|
var r = c.foo(y); |