Fix expansion in destructuring inside comprehensions

This commit is contained in:
xixixao
2014-01-24 18:18:55 +00:00
parent daa6ad5470
commit bd6b4142fe
3 changed files with 11 additions and 5 deletions

View File

@@ -1914,7 +1914,7 @@ exports.For = class For extends While
@returns = no if lastJumps and lastJumps instanceof Return
source = if @range then @source.base else @source
scope = o.scope
name = @name and (@name.compile o, LEVEL_LIST)
name = @name and (@name.compile o, LEVEL_LIST) if not @pattern
index = @index and (@index.compile o, LEVEL_LIST)
scope.find(name) if name and not @pattern
scope.find(index) if index