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

error message when proto has no implementation (class A { proto method x { * }; }) #6206

Closed
p6rt opened this issue Apr 24, 2017 · 5 comments
Closed
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Apr 24, 2017

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

Searchable as RT131201$

@p6rt
Copy link
Author

p6rt commented Apr 24, 2017

From @AlexDaniel

Code​:
class A {
  proto method x { * };
};
A.x

Result​:
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 block <unit> at -e line 4
Cannot resolve caller x(A); none of these signatures match​:
  in block <unit> at -e line 4

First of all, it says “none of these signatures match​:” and then it prints the line number. There are no signatures, I get it, but the error message is ugly.

Also, “Use of uninitialized value of type Any in string context.” does not seem to be coming from the user code, I guess it happens during the error message generation, but I could be wrong.

@p6rt
Copy link
Author

p6rt commented Jun 1, 2017

From kernel.julien@gmail.com

I wrote a PR to try to fix the messages : rakudo/rakudo#1094

I don't know how to indicate to the user that a prototype method is unimplemented.

@p6rt
Copy link
Author

p6rt commented Jun 1, 2017

From @zoffixznet

On Mon, 24 Apr 2017 04​:32​:33 -0700, alex.jakimenko@​gmail.com wrote​:

Code​:
class A {
proto method x { * };
};
A.x

Result​:
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 block <unit> at -e line 4
Cannot resolve caller x(A); none of these signatures match​:
in block <unit> at -e line 4

First of all, it says “none of these signatures match​:” and then it
prints the line number. There are no signatures, I get it, but the
error message is ugly.

Also, “Use of uninitialized value of type Any in string context.” does
not seem to be coming from the user code, I guess it happens during
the error message generation, but I could be wrong.

Thank you for the report. jsimonet++ fixed the issue.

Fix​: rakudo/rakudo@02614f6477
Test​: rakudo/rakudo@8e0d000fbb

@p6rt
Copy link
Author

p6rt commented Jun 1, 2017

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

@p6rt
Copy link
Author

p6rt commented Jun 1, 2017

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

@p6rt p6rt closed this as completed Jun 1, 2017
@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