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 on undeclared attribute #5251

Open
p6rt opened this issue Apr 21, 2016 · 2 comments
Open

error message on undeclared attribute #5251

p6rt opened this issue Apr 21, 2016 · 2 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Apr 21, 2016

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

Searchable as RT127950$

@p6rt
Copy link
Author

p6rt commented Apr 21, 2016

From @tadzik

The compiler error about undeclared attribute points to nonexistent
last+1 line in the file. It would be more helpful if it pointed to the
line where the undeclared attribute is accessed.

$ cat -n bug.pl
  1 unit class Bug;
  2
  3 method foo {
  4 say $!attribute;
  5 }
$ perl6 bug.pl
===SORRY!=== Error while compiling /home/tadzik/bug.pl
Attribute $!attribute not declared in class Bug
at /home/tadzik/bug.pl​:6
------> <BOL>�<EOL>
  expecting any of​:
  postfix
  statement end
$ perl6 --version
This is Rakudo version 2016.04-2-g6df7ff8 built on MoarVM version 2016.04
implementing Perl 6.c.

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @zoffixznet

Still present in Rakudo version 2016.06-154-g55c359e built on MoarVM version 2016.06-9-g8fc21d5

zoffix@​VirtualBox​:/tmp/tmp.WLAeCqLE4S$ cat > bug2.pl
unit class Bug; method foo { say $!attribute; }

zoffix@​VirtualBox​:/tmp/tmp.WLAeCqLE4S$ perl6 bug2.pl
===SORRY!=== Error while compiling /tmp/tmp.WLAeCqLE4S/bug2.pl
Attribute $!attribute not declared in class Bug
at /tmp/tmp.WLAeCqLE4S/bug2.pl​:2
------> <BOL>�<EOL>
  expecting any of​:
  postfix
  statement end

@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