Skip Menu |
Report information
Id: 124006
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: raydiak [at] cyberuniverses.com
Cc:
AdminCc:

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



From: raydiak [...] cyberuniverses.com
To: rakudobug [...] perl.org
Subject: [BUG] Callable roles fail to compile with non-meta method calls on self
Date: Fri, 6 Mar 2015 22:09:50 +0000
Download (untitled) / with headers
text/plain 446b
See http://irclog.perlgeek.de/perl6/2015-03-06#i_10237431 and the next few examples. perl6 -e 'role R does Callable { method foo { self.say } }' ===SORRY!=== Internal error: failed to remove block Removing the Callable role, or inheriting with 'is' instead of composing, makes the error go away. Calling metamethods (.WHAT tested) also works. Even removing the method surrounding the call gives the same error, instead of 'no self available'.
Download (untitled) / with headers
text/plain 956b
On Fri, 06 Mar 2015 14:10:06 -0800, raydiak@cyberuniverses.com wrote: Show quoted text
> See http://irclog.perlgeek.de/perl6/2015-03-06#i_10237431 and the next > few examples. > > perl6 -e 'role R does Callable { method foo { self.say } }' > ===SORRY!=== > Internal error: failed to remove block > > Removing the Callable role, or inheriting with 'is' instead of > composing, makes the error go away. Calling metamethods (.WHAT tested) > also works. > > Even removing the method surrounding the call gives the same error, > instead of 'no self available'.
Current behavior suggests this has been fixed: $ perl6 -e 'role R does Callable { method foo { self.say } }' $ perl6 -e 'role R does Callable { method foo { self.say } }; R.foo' (R) $ perl6 -e 'role R does Callable { self.say }; R.foo' ===SORRY!=== Error while compiling -e 'self' used where no object is available at -e:1 ------> role R does Callable {⏏ self.say }; R.foo expecting any of: term


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