-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: TransformsRelates to the public transform APIRelates to the public transform APIFixedA PR has been merged for this issueA PR has been merged for this issueHigh Priority
Milestone
Description
TypeScript Version: 2.1.0-dev.20161102
Code
Source
export class Foo {
public foo(...strings: string[]): this {
return this;
}
}
const instance = new Foo();
instance
.foo(...[])
.foo(...[])
Compiled Code
"use strict";
var Foo = (function () {
function Foo() {
}
Foo.prototype.foo = function () {
var strings = [];
for (var _i = 0; _i < arguments.length; _i++) {
strings[_i - 0] = arguments[_i];
}
return this;
};
return Foo;
}());
exports.Foo = Foo;
var instance = new Foo();
(_a = instance
.foo(...[])).foo.apply(_a, []);
var _a;
Expected behavior:
The compiled code should not contain ...
.
Actual behavior:
(_a = instance
.foo(...[])).foo.apply(_a, []);
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: TransformsRelates to the public transform APIRelates to the public transform APIFixedA PR has been merged for this issueA PR has been merged for this issueHigh Priority