mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Fixing direct construction splats.
This commit is contained in:
@@ -520,8 +520,10 @@
|
||||
__extends(Call, Base);
|
||||
Call.prototype.children = ['variable', 'args'];
|
||||
Call.prototype.newInstance = function() {
|
||||
if (this.variable.base instanceof Call) {
|
||||
this.variable.base.newInstance();
|
||||
var base;
|
||||
base = this.variable.base || this.variable;
|
||||
if (base instanceof Call) {
|
||||
base.newInstance();
|
||||
} else {
|
||||
this.isNew = true;
|
||||
}
|
||||
|
||||
@@ -433,8 +433,9 @@ exports.Call = class Call extends Base
|
||||
|
||||
# Tag this invocation as creating a new instance.
|
||||
newInstance: ->
|
||||
if @variable.base instanceof Call
|
||||
@variable.base.newInstance()
|
||||
base = @variable.base or @variable
|
||||
if base instanceof Call
|
||||
base.newInstance()
|
||||
else
|
||||
@isNew = true
|
||||
this
|
||||
|
||||
Reference in New Issue
Block a user