2014-07-13 01:04:16 +02:00
|
|
|
//// [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() {
|
|
|
|
}
|
2015-03-09 02:23:23 +01:00
|
|
|
A.prototype.foo = function () {
|
|
|
|
};
|
2014-07-13 01:04:16 +02:00
|
|
|
return A;
|
|
|
|
})();
|
|
|
|
var B = (function () {
|
|
|
|
function B() {
|
|
|
|
}
|
2015-03-09 02:23:23 +01:00
|
|
|
B.prototype.bar = function () {
|
|
|
|
};
|
2014-07-13 01:04:16 +02:00
|
|
|
return B;
|
|
|
|
})();
|
2015-03-09 02:23:23 +01:00
|
|
|
function g(x) {
|
|
|
|
}
|
2014-08-16 00:49:09 +02:00
|
|
|
g(7); // the parameter list is fixed, so this should not error
|