-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scope of temporary variable #35
Comments
Hmm, that's a fair question -- we're actually taking special care in this case to ensure that variables within the comprehension are declared first outside of it. If you write a comprehension, but don't use it as part of an expression, then no closure wrapper is generated ... a comprehension isn't a function, in CoffeeScript, and doesn't imply function scope. Whether it needs to be wrapped in one or not is determined by where it occurs. It would be awfully strange if sometimes you could set variables from within a comprehension, and sometimes you couldn't -- so, to alleviate that, the auto-closures share a scope with their parent node. Sound alright? |
No objections then ... closing the issue. |
…s#35 by @astuchkin. The change is that __iced_deferrals is now available to "custom" defer-handlers, like Rendezvous and others. Also solves the ugly rv.__iced_deferrals.defer() hack...
Currently
is converted to:
shouldn't it be:
The text was updated successfully, but these errors were encountered: