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

Incorrectly places '{' in signature incorrectly reports block gobbling #5017

Open
p6rt opened this issue Jan 7, 2016 · 1 comment
Open
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Jan 7, 2016

Migrated from rt.perl.org#127205 (status was 'new')

Searchable as RT127205$

@p6rt
Copy link
Author

p6rt commented Jan 7, 2016

From @zoffixznet

The error in the code is that '{' for the $y parameter is BEFORE the 'where' instead of after it. The error messages, however, show a different error​:

<Zoffix> m​: sub foo ( $x where { any <foo bar> }, $y { where 42 } ) { };
<camelia> rakudo-moar f1dd49​: OUTPUT«===SORRY!===␤Expression needs parens to avoid gobbling block␤at /tmp/zGERsntt2y​:1␤------> sub foo ( $x where { any <foo bar> }⏏, $y { where 42 } ) { };␤Missing block (apparently claimed by expression)␤at /tmp/zGERsntt2y​:1␤------>…»
<Zoffix> m​: sub foo ( $x where { 42 }, $y { where 42 } ) { };
<camelia> rakudo-moar f1dd49​: OUTPUT«===SORRY!===␤Expression needs parens to avoid gobbling block␤at /tmp/gSOsYvX4uK​:1␤------> sub foo ( $x where { 42 }⏏, $y { where 42 } ) { };␤Missing block (apparently claimed by expression)␤at /tmp/gSOsYvX4uK​:1␤------> sub foo …»

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant