1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Removing unnecessary assignment

This commit is contained in:
Bruno Bernardino 2015-08-16 21:33:58 +01:00
parent 93e4eeafed
commit cc98e99070

View file

@ -1892,11 +1892,10 @@ exports.Try = class Try extends Base
# is optional, the *catch* is not.
compileNode: (o) ->
o.indent += TAB
scope = o.scope
tryPart = @attempt.compileToFragments o, LEVEL_TOP
catchPart = if @recovery
generatedErrorVariableName = scope.freeVariable 'error'
generatedErrorVariableName = o.scope.freeVariable 'error'
placeholder = new Literal generatedErrorVariableName
@recovery.unshift new Assign @errorVariable, placeholder if @errorVariable
[].concat @makeCode(" catch ("), placeholder.compileToFragments(o), @makeCode(") {\n"),