Skip to content
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

optional arguments cannot be initialised with async expressions #22

Open
refractalize opened this issue Mar 9, 2013 · 0 comments
Open

Comments

@refractalize
Copy link
Member

Consider this:

n = 0

f! = ++n

o! (a: f!) = a

console.log (o!)
console.log (o!)

This compiles into something you wouldn't expect, that is, the definition of o is made after an asynchronous call to f, so the first invocation of o comes out as you'd expect with a result of 1, but the second also comes out as 1, whereas you'd expect it to run f again to yield a result of 2.

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

No branches or pull requests

1 participant