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

WhateverCode in a chained comparison fails to parse ("QAST::Block with cuid 1 has not appeared") #5539

Closed
p6rt opened this issue Aug 6, 2016 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 6, 2016

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

Searchable as RT128859$

@p6rt
Copy link
Author

p6rt commented Aug 6, 2016

From @smls

  ➜ my &x = (1 < *+1 < 5);
  ===SORRY!===
  QAST​::Block with cuid 1 has not appeared

When removing the method call, it works fine​:

  ➜ my &x = (1 < * < 5);

Removing one of the comparison operators, :

  ➜ my &x = (1 < *.Int);
  ➜ my &x = (*.Int < 5);

But this fails to parse​:

@p6rt
Copy link
Author

p6rt commented Aug 6, 2016

@smls - Status changed from 'new' to 'deleted'

@p6rt
Copy link
Author

p6rt commented Aug 6, 2016

From @smls

  ➜ my &x = (1 < *+1 < 5);
  ===SORRY!===
  QAST​::Block with cuid 1 has not appeared

When removing the inner expression (so that the comparison chain get to deal with the Whatever star directly, rather than a WhateverCode), it works fine​:

  ➜ my &x = (1 < * < 5);

When replacing the comparison chain with a single comparison, it also works fine​:

  ➜ my &x = (1 < *+1);
  ➜ my &x = (*+1 < 5);

@p6rt
Copy link
Author

p6rt commented Oct 3, 2017

From @geekosaur

[03 05​:10​:36] <hoffentlichja> m​: subset MyStr of Str where 4 < *.chars <
10; my MyStr $s = 's';
[03 05​:10​:37] <camelia> rakudo-moar fcbd8a​: OUTPUT​: «===SORRY!===␤
[03 05​:10​:37] QAST​::Block with cuid 1 has not appeared␤
[03 05​:10​:37] »
[03 05​:11​:12] <hoffentlichja> what's happening here, how can I set that
constraint?
[03 05​:15​:05] <hoffentlichja> the error message is a bit cryptic
[03 05​:15​:14] <geekosaur> it's an internal error that shouldn't happen
(...)
[03 05​:19​:42] <geekosaur> m​: my &s = 4 < *.chars < 10; say &s("sssss")
[03 05​:19​:43] <camelia> rakudo-moar fcbd8a​: OUTPUT​: «===SORRY!===␤
[03 05​:19​:43] QAST​::Block with cuid 1 has not appeared␤
[03 05​:19​:43] »
[03 05​:19​:58] <geekosaur> looks like WhateverCode parsing doesn't mix well
with chained comparisons

--
brandon s allbery kf8nh sine nomine associates
allbery.b@​gmail.com ballbery@​sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

@p6rt
Copy link
Author

p6rt commented Feb 4, 2018

From @zoffixznet

On Mon, 02 Oct 2017 22​:24​:32 -0700, allbery.b@​gmail.com wrote​:

[03 05​:10​:36] <hoffentlichja> m​: subset MyStr of Str where 4 < *.chars <
10; my MyStr $s = 's';
[03 05​:10​:37] <camelia> rakudo-moar fcbd8a​: OUTPUT​: «===SORRY!===␤
[03 05​:10​:37] QAST​::Block with cuid 1 has not appeared␤
[03 05​:10​:37] »
[03 05​:11​:12] <hoffentlichja> what's happening here, how can I set that
constraint?
[03 05​:15​:05] <hoffentlichja> the error message is a bit cryptic
[03 05​:15​:14] <geekosaur> it's an internal error that shouldn't happen
(...)
[03 05​:19​:42] <geekosaur> m​: my &s = 4 < *.chars < 10; say &s("sssss")
[03 05​:19​:43] <camelia> rakudo-moar fcbd8a​: OUTPUT​: «===SORRY!===␤
[03 05​:19​:43] QAST​::Block with cuid 1 has not appeared␤
[03 05​:19​:43] »
[03 05​:19​:58] <geekosaur> looks like WhateverCode parsing doesn't mix well
with chained comparisons

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@752bb8b381a06dd
Test​: Raku/roast@bfe4cb9c2c0952b44

@p6rt
Copy link
Author

p6rt commented Feb 4, 2018

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

@p6rt
Copy link
Author

p6rt commented Feb 4, 2018

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

@p6rt p6rt closed this as completed Feb 4, 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