#1568, new super in a function body.

This commit is contained in:
Jeremy Ashkenas
2011-08-14 17:24:19 -04:00
parent 8c31f2ee44
commit 7e4d6198d4
2 changed files with 3 additions and 3 deletions

View File

@@ -527,8 +527,8 @@
}
Call.prototype.children = ['variable', 'args'];
Call.prototype.newInstance = function() {
var base;
base = this.variable.base || this.variable;
var base, _ref2;
base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable;
if (base instanceof Call && !base.isNew) {
base.newInstance();
} else {

View File

@@ -460,7 +460,7 @@ exports.Call = class Call extends Base
# Tag this invocation as creating a new instance.
newInstance: ->
base = @variable.base or @variable
base = @variable?.base or @variable
if base instanceof Call and not base.isNew
base.newInstance()
else