Skip Menu |
Report information
Id: 127950
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: tadeusz.sosnierz [at] onet.pl
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: Tadeusz Sośnierz <tadeusz.sosnierz [...] onet.pl>
Subject: [BUG] LTA error message on undeclared attribute
To: rakudobug [...] perl.org
Date: Thu, 21 Apr 2016 16:19:26 +0200
Download (untitled) / with headers
text/plain 654b
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.
Download (untitled) / with headers
text/plain 479b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org