incorrect nested loop expression #238

Closed
clkao opened this Issue Dec 25, 2012 · 2 comments

Projects

None yet

4 participants

@clkao
Contributor
clkao commented Dec 25, 2012
res = for i in [1 to 10]
  [x] = [ z for z in [1 to 2] ]
  x + i

this returns an array of array, while the inner loop was just for looking something up rather than constructing another level of nested loops.

@gkz gkz added a commit that closed this issue Dec 25, 2012
@gkz fix #238 309e87f
@gkz gkz closed this in 309e87f Dec 25, 2012
@satyr
Contributor
satyr commented Dec 26, 2012

What about:

res = for i to 9
  while 0 => while 0 =>  
  i
@gkz gkz reopened this Jan 12, 2013
@gkz gkz closed this in 88910ee Jan 13, 2013
@vendethiel vendethiel reopened this Jul 31, 2013
@vendethiel
Contributor

reopening since it's still broken (a bit "deeper", but it indeed needs to work like makeReturn)

@gkz gkz added a commit that referenced this issue Apr 15, 2015
@gkz object comprehension fixes and improved tests
closes #614, #238, #639, #538
fd7437f
@gkz gkz closed this Apr 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment