mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
#1568, new super in a function body.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user