You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
added
the
LTA
Less Than Awesome; typically an error message that could be better
label
Jan 5, 2020
Migrated from rt.perl.org#127950 (status was 'new')
Searchable as RT127950$
The text was updated successfully, but these errors were encountered: