mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
subtle call order bug was preventing variable declarations
This commit is contained in:
parent
3724778989
commit
56015bd23f
1 changed files with 2 additions and 1 deletions
|
@ -122,9 +122,10 @@ module CoffeeScript
|
|||
end
|
||||
|
||||
def compile_with_declarations(o={})
|
||||
code = compile_node(o)
|
||||
decls = ''
|
||||
decls = "#{o[:indent]}var #{o[:scope].declared_variables.join(', ')};\n" if o[:scope].declarations?(self)
|
||||
code = decls + compile_node(o)
|
||||
decls + code
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue