On Tue, 09 Aug 2016 15:25:11 -0700, alex.jakime...@gmail.com wrote: > Let's look at the code in Rakudo! From src/core/Whatever.pm > > my class HyperWhatever { > multi method new(HyperWhatever:) { X::Cannot::New.new(class => > self).throw } > … > } > > So it seems like it should throw a warning if we try to create a > HyperWhatever > object, right? Let's see! > > Code: > say HyperWhatever.new > > Result: > sub (*@_) { #`(Sub|54745104) ... } > > > Apparently, the code in “.new” method of Whatever.pm is not being > reached.
Dug a bit more into it... It's getting interpreted as an attempt to hyper-whatever a .new call (so like **.new), and the QAST gets added a call to &HYPERWHATEVER, which returns the sub you see in the output. No idea if there's any easy way to make it DTRT, so I'm going to leave this for someone else...