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

"where" clauses are parsed, but not enforced, in "my" expressions #5571

Closed
p6rt opened this issue Aug 15, 2016 · 5 comments
Closed

"where" clauses are parsed, but not enforced, in "my" expressions #5571

p6rt opened this issue Aug 15, 2016 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 15, 2016

Migrated from rt.perl.org#128935 (status was 'resolved')

Searchable as RT128935$

@p6rt
Copy link
Author

p6rt commented Aug 15, 2016

From @timo

  gfldex​: m​: dd my ($i, $k where * == 4) = (1,3); dd $i, $k
  +camelia​: rakudo-moar ee8a25​: OUTPUT«(1, 3)␤Int $i = 1␤Int $k = 3␤»

Shouldn't allow $k to be bound to any value that doesn't numify to 4,
but it does.

Alternatively (or "in the mean time") it should probably complain that
it's NYI.

@p6rt
Copy link
Author

p6rt commented Aug 25, 2016

@coke - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 4, 2016

From @zoffixznet

On Sun, 14 Aug 2016 18​:19​:44 -0700, timo wrote​:

gfldex​:   m​: dd my \($i, $k where \* == 4\) = \(1,3\); dd $i, $k
\+camelia​: rakudo\-moar ee8a25​: OUTPUT«\(1, 3\)␤Int $i = 1␤Int $k = 3␤»

Shouldn't allow $k to be bound to any value that doesn't numify to 4,
but it does.

Alternatively (or "in the mean time") it should probably complain that
it's NYI.

It is implemented and works for single variables. The bug occurs whenever the my is done on several variables.

And I can't get it to dump the parse tree, as it hangs (perhaps related to the bug?)​:

This is the shortest hanging golf I got​:

./perl6 --target=parse -e 'my ($, $)'

@p6rt
Copy link
Author

p6rt commented Jan 20, 2018

From @zoffixznet

On Sun, 04 Dec 2016 01​:21​:56 -0800, cpan@​zoffix.com wrote​:

On Sun, 14 Aug 2016 18​:19​:44 -0700, timo wrote​:

gfldex​: m​: dd my ($i, $k where * == 4) = (1,3); dd $i, $k
+camelia​: rakudo-moar ee8a25​: OUTPUT«(1, 3)␤Int $i = 1␤Int $k = 3␤»

Shouldn't allow $k to be bound to any value that doesn't numify to 4,
but it does.

Alternatively (or "in the mean time") it should probably complain
that
it's NYI.

It is implemented and works for single variables. The bug occurs
whenever the my is done on several variables.

And I can't get it to dump the parse tree, as it hangs (perhaps
related to the bug?)​:

This is the shortest hanging golf I got​:

./perl6 --target=parse -e 'my ($, $)'

Using fix​: Fix postconstraints in `my (...)` being ignored
Using test​: Test postconstraints in `my (...)`

Thank you for the report. This is now fixed in branch `post-release`.

Fix​: rakudo/rakudo@3745eff13a21ad8
Test​: Raku/roast@4ce0fc56db432b52b

@p6rt
Copy link
Author

p6rt commented Jan 20, 2018

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jan 20, 2018
@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