TypeScript/tests/baselines/reference/genericCallWithFixedArguments.js
2015-02-06 18:45:09 -08:00

25 lines
534 B
JavaScript

//// [genericCallWithFixedArguments.ts]
class A { foo() { } }
class B { bar() { }}
function g<T, U>(x) { }
g<A, B>(7) // the parameter list is fixed, so this should not error
//// [genericCallWithFixedArguments.js]
var A = (function () {
function A() {
}
A.prototype.foo = function () { };
return A;
})();
var B = (function () {
function B() {
}
B.prototype.bar = function () { };
return B;
})();
function g(x) { }
g(7); // the parameter list is fixed, so this should not error