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

iced2 await/defer+ try + continue = wrong execution #207

Open
vird opened this issue Aug 21, 2020 · 0 comments
Open

iced2 await/defer+ try + continue = wrong execution #207

vird opened this issue Aug 21, 2020 · 0 comments

Comments

@vird
Copy link

vird commented Aug 21, 2020

#!/usr/bin/env iced
console.log "HERE"
for i in [0 ... 10]
  console.log "ok", i
  await setTimeout defer(), 10 # comment this line and all fixed
  try
    a = 1
    console.log "OK"
  catch err
    console.log "WTF"
    continue
  console.log "fail", i
console.log "THERE"

expected

HERE
ok 0
OK
fail 0
ok 1
OK
fail 1
ok 2
OK
fail 2
ok 3
OK
fail 3
ok 4
OK
fail 4
ok 5
OK
fail 5
ok 6
OK
fail 6
ok 7
OK
fail 7
ok 8
OK
fail 8
ok 9
OK
fail 9
THERE

real

HERE
ok 0
OK

iced -v
IcedCoffeeScript version 108.0.13

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