// no errors expected class C { constructor(public data: T) { } foo(x: U) { return x; } } interface Foo extends Date { foo: string; } var y: Foo = null; var c = new C(y); var r = c.foo(y);