2014-07-13 01:04:16 +02:00
|
|
|
//// [generics3.ts]
|
|
|
|
class C<T> { private x: T; }
|
|
|
|
interface X { f(): string; }
|
|
|
|
interface Y { f(): string; }
|
|
|
|
var a: C<X>;
|
|
|
|
var b: C<Y>;
|
|
|
|
|
|
|
|
a = b; // Ok - should be identical
|
|
|
|
|
|
|
|
//// [generics3.js]
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
|
|
|
return C;
|
|
|
|
})();
|
|
|
|
var a;
|
|
|
|
var b;
|
|
|
|
a = b;
|
|
|
|
|
|
|
|
|
|
|
|
//// [generics3.d.ts]
|
2014-07-11 23:44:31 +02:00
|
|
|
declare class C<T> {
|
|
|
|
private x;
|
|
|
|
}
|
|
|
|
interface X {
|
2014-07-12 01:36:06 +02:00
|
|
|
f(): string;
|
2014-07-11 23:44:31 +02:00
|
|
|
}
|
|
|
|
interface Y {
|
2014-07-12 01:36:06 +02:00
|
|
|
f(): string;
|
2014-07-11 23:44:31 +02:00
|
|
|
}
|
2014-07-12 01:36:06 +02:00
|
|
|
declare var a: C<X>;
|
|
|
|
declare var b: C<Y>;
|