mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 19:34:27 -05:00
slightly optimizing return values of AssignNodes. Issue #539
This commit is contained in:
@@ -758,7 +758,10 @@ exports.AssignNode: class AssignNode extends BaseNode
|
||||
@variable instanceof ValueNode
|
||||
|
||||
makeReturn: ->
|
||||
return new Expressions [this, new ReturnNode(@variable)]
|
||||
if @isStatement()
|
||||
return new Expressions [this, new ReturnNode(@variable)]
|
||||
else
|
||||
super()
|
||||
|
||||
isStatement: ->
|
||||
@isValue() and (@variable.isArray() or @variable.isObject())
|
||||
|
||||
Reference in New Issue
Block a user