Permalink
Browse files

Added expectation for 'for ... from' loop with complex value is the s…

…ubject of iteration
  • Loading branch information...
1 parent 9afa3e3 commit 87b4431b16e7b58ae1c69c20e5400d80320a7ee4 @benekastah benekastah committed Jun 21, 2011
Showing with 10 additions and 0 deletions.
  1. BIN .DS_Store
  2. +10 −0 expectations/extend_for
View
BIN .DS_Store
Binary file not shown.
View
10 expectations/extend_for
@@ -117,3 +117,13 @@ to:
var i, x; for (i in a) {if (!a.hasOwnProperty(i)) continue; x = a[i];
fn()
}
+
+compiles:
+for (i, x from a()) {
+ fn()
+}
+
+to:
+var _xpr, i, x; for (i in (_xpr=a())) {if (!_xpr.hasOwnProperty(i)) continue; x = _xpr[i];
+ fn()
+}

0 comments on commit 87b4431

Please sign in to comment.