TypeScript/tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts

16 lines
348 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
function f<x, x>() { }
function f2<X, X>(a: X, b: X): X { return null; }
class C<X, X> {
public f<x, x>() {}
public f2<X, X>(a: X, b: X): X { return null; }
}
interface I<X, X> {
f<X, X>();
f2<X, X>(a: X, b: X): X;
}
var m = {
a: function f<X, X>() {},
b: function f2<X, X>(a: X, b: X): X { return null; }
}