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

Channel: earliest $channel { ... } does not go away at end of scope #4679

Closed
p6rt opened this issue Oct 26, 2015 · 4 comments
Closed

Channel: earliest $channel { ... } does not go away at end of scope #4679

p6rt opened this issue Oct 26, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 26, 2015

Migrated from rt.perl.org#126454 (status was 'rejected')

Searchable as RT126454$

@p6rt
Copy link
Author

p6rt commented Oct 26, 2015

From zengargoyle@gmail.com

This is perl6 version 2015.10-16-g2f4bfd8 built on MoarVM version 2015.10

https://gist.github.com/zengargoyle/5324c93684d6f5a376a3

for 1,1,2,2 -> $num, $value {
  ... stuff ...
loop {
  earliest $channel {
  more * { ... $num and $value are both still 1 even on second for loop ... }
  done * { last }
  }
  }
}

On the second time through the surrounding for loop, inside the
earliest block, the lexical $num and $value are still the values from
the first time through the loop.

Github gist has a test case.


zengargoyle

@p6rt
Copy link
Author

p6rt commented Dec 12, 2015

From @jnthn

On Sun Oct 25 17​:25​:56 2015, zengargoyle@​gmail.com wrote​:

This is perl6 version 2015.10-16-g2f4bfd8 built on MoarVM version
2015.10

https://gist.github.com/zengargoyle/5324c93684d6f5a376a3

for 1,1,2,2 -> $num, $value {
... stuff ...
loop {
earliest $channel {
more * { ... $num and $value are both still 1 even on second for
loop ... }
done * { last }
}
}
}

On the second time through the surrounding for loop, inside the
earliest block, the lexical $num and $value are still the values from
the first time through the loop.

Github gist has a test case.

The earliest syntax has been removed from Perl 6, and there are plenty of examples of the react/supply/whenever syntax that replaces it and closure semantics, so will reject this one.

/jnthn

@p6rt
Copy link
Author

p6rt commented Dec 12, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 12, 2015

@jnthn - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Dec 12, 2015
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant