2014-07-13 01:04:16 +02:00
|
|
|
//// [genericTypeReferencesRequireTypeArgs.ts]
|
|
|
|
class C<T> {
|
|
|
|
foo(): T { return null }
|
|
|
|
}
|
|
|
|
interface I<T> {
|
|
|
|
bar(): T;
|
|
|
|
}
|
|
|
|
var c1: C; // error
|
|
|
|
var i1: I; // error
|
|
|
|
var c2: C<I>; // should be an error
|
|
|
|
var i2: I<C>; // should be an error
|
|
|
|
|
|
|
|
|
|
|
|
//// [genericTypeReferencesRequireTypeArgs.js]
|
|
|
|
var C = (function () {
|
|
|
|
function C() {
|
|
|
|
}
|
|
|
|
C.prototype.foo = function () {
|
|
|
|
return null;
|
|
|
|
};
|
|
|
|
return C;
|
|
|
|
})();
|
2014-08-15 01:36:33 +02:00
|
|
|
var c1; // error
|
|
|
|
var i1; // error
|
|
|
|
var c2; // should be an error
|
|
|
|
var i2; // should be an error
|