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

Gut-referencing warning when composing stubbed role #5791

Open
p6rt opened this issue Nov 9, 2016 · 3 comments
Open

Gut-referencing warning when composing stubbed role #5791

p6rt opened this issue Nov 9, 2016 · 3 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Nov 9, 2016

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

Searchable as RT130065$

@p6rt
Copy link
Author

p6rt commented Nov 9, 2016

From @zoffixznet

<ZoffixW> m​: role A {...}; class B does A {}
<camelia> rakudo-moar a822bc​: OUTPUT«Use of uninitialized value of
type Any in string context.␤Methods .^name, .perl, .gist, or .say can
be used to stringify it to something meaningful.␤ in any try_select
at gen/moar/m-Metamodel.nqp line 2653␤===SORRY!=== Error while
compiling <t…»

The line references try_select at
https://github.com/rakudo/rakudo/blob/a822bcf9cf1570cbf6f1c0285f6e8a66523988c7/src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp#L104

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
@usev6
Copy link

usev6 commented Apr 4, 2021

The current error message looks better to me. There is no gut-referencing anymore and it states that role A was not found:

$ ./rakudo-m -e 'role A {...}; class B does A {}'
===SORRY!=== Error while compiling -e
No appropriate parametric role variant available for 'A':
    Cannot resolve caller (B); Routine does not have any candidates. Is only the proto defined?
at -e:1

It talks about Routine, which might be a bit surprising. So, still LTA or closeable with test?

@lizmat
Copy link
Contributor

lizmat commented Apr 4, 2021

Yeah, LTA:

Comment in the code: # Use multi-dispatcher to pick the body block of the best role.

That fails, and the error is quoted verbatim in src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp (line 100).

So it feels like the error that is being quoted, needs a bit of mangling.

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

3 participants