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

LTA error when using & coercer on a role #1965

Open
zoffixznet opened this issue Jun 25, 2018 · 1 comment
Open

LTA error when using & coercer on a role #1965

zoffixznet opened this issue Jun 25, 2018 · 1 comment
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@zoffixznet
Copy link
Contributor

Just spotted something in the logs:

m: role R { }; &R
rakudo-moar e9351cbaa: OUTPUT: «=== SORRY!===  Error while compiling <tmp>␤Illegally post-declared type:␤ R used at line 1␤␤»

The user erroneously was prepending & to a role name while trying to call .WHAT.say on it and it was giving that error.

Don't know what the right behaviour/error should be, but at the very least the error claims something is post-declared, yet in the code it's pre-declared.

@zoffixznet zoffixznet added the LTA Less Than Awesome; typically an error message that could be better label Jun 25, 2018
@ribbon-otter
Copy link
Contributor

Note that there is similar behaviour for classes as well.

> class T { }; &T
===SORRY!=== Error while compiling:
Illegally post-declared type:
   T used at line 1

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

2 participants