Skip to content

Conversation

@zdenko
Copy link
Collaborator

@zdenko zdenko commented Jan 12, 2018

Fixes #4105

a = 3
foo [0..a]
var a;
a = 3;
foo((function() {
  var results = [];
  for (var i = 0; 0 <= a ? i <= a : i >= a; 0 <= a ? i++ : i--){ results.push(i); }
  return results;
}).apply(this));

b = [1..a]
var b;
b = (function() {
  var results = [];
  for (var i = 1; 1 <= a ? i <= a : i >= a; 1 <= a ? i++ : i--){ results.push(i); }
  return results;
}).apply(this);

@GeoffreyBooth
Copy link
Collaborator

Nice work! I love closing 3-year-old bugs.

@GeoffreyBooth GeoffreyBooth merged commit e348026 into jashkenas:master Jan 15, 2018
@benjie
Copy link

benjie commented Jan 15, 2018

🎉

zdenko added a commit to zdenko/coffeescript that referenced this pull request Jan 17, 2018
GeoffreyBooth pushed a commit that referenced this pull request Feb 1, 2018
…ariables (#4853)

* fix #2047

* Additional check for 'step'; tests

* Fix #4105 (#4855)

* Update output

* Throw warning for unsupported runtimes, e.g. Node < 6 (#4839)

* fix #1403 (#4854)

* Update output

* [Change]: Destructuring with non-final spread should still use rest syntax (#4517) (#4825)

* destructuring optimization

* refactor

* minor improvement, fix errors

* minor refactoring

* improvements

* Update output

* Update output

* Fix #4843: bad output when assigning to @prop in destructuring assignment with defaults (#4848)

* fix #4843

* improvements

* typo

* small fix

* Fix #3441: parentheses wrapping expression throw invalid error  (#4849)

* fix #3441

* improvements

* refactor

* Fix #1726: expression in property access causes unexpected results (#4851)

* fix #1726

* Explain what's happening, rather than just linking to an issue

* Updated output

* Optimization

* Update output

* remove casting to number

* cleanup tests
@GeoffreyBooth GeoffreyBooth mentioned this pull request Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants