This started with my mis-remembering "multi method" like: class Myclass { multi-method Rat { 'Rat' } }
Then wondering why is Raku accepting the unknown 'multi-method' followed by a known classname; and only tripping over the block or parentheses. It is just an odd puzzle for me that "UnknownBareId KnownClassId" is accepted has the start of a valid statement. How would such a statement be completed? Thanks, rir On Wed, Feb 24, 2021 at 05:48:07PM +0100, Elizabeth Mattijsen wrote: > $ raku -e 'class samesame { hello samesame, { say "Wosup?" } }' > ===SORRY!=== Error while compiling -e > Undeclared routine: > hello used at line 1. Did you mean 'shell'? > > Are you missing a comma there? Did you intend to call the "hello" > subroutine, with "samesame" and the block as parameters? > > If not, what *did* you mean to accomplish? > > > On 24 Feb 2021, at 17:40, rir <rir...@comcast.net> wrote: > > > > Hello, > > > >> class samesame { hello samesame { say "Wosup?" } } > > > > ===SORRY!=== Error while compiling: > > Unexpected block in infix position (missing statement control word before > > the expression?) > > ------> class samesame { hello samesame⏏ { say "Wosup?" } } > > expecting any of: > > infix > > infix stopper > > postfix > > > > Why is this a special case instead of a common undeclared error? The > > second 'samesame' could be 'Instant' and do the same. > > I'm not seeing how to continue from the ⏏ to make a statement. > > > > > > rir > > >