On Sun, 04 Jun 2017 11:19:57 -0700, c...@zoffix.com wrote: > On Wed, 09 Dec 2015 08:12:00 -0800, alex.jakime...@gmail.com wrote: > > Code: > > say 42 .WHAT > > > > Result: > > ===SORRY!=== > > Method call must either supply a name or have a child node that > > evaluates > > to the name > > > > > > Well, I think that it should work. One practical use is 「^42 .WHAT」. > > > > Some explanation: > > > > <psch> well, .WHAT anywhere in a space-y method call chain didn't > > work with > > the original commit either > > <psch> so it's at least not a regression > > <AlexDaniel> okay, interesting > > <psch> probably 'cause .WHAT doesn't go the normal > > QAST::Op(:op<callmethod>,...) route > > <moritz> right, it's macro-Y > > <psch> which fits the error message, 'cause we apparently build such > > an Op > > but > > don't populate the children correctly, because .WHAT > > isn't a > > method > > that can be called with callmethod > > > > > > Well, if it is not supposed to work, then at least the error message > > should > > be awesome. Right now it doesn't even mention the line number. > > > +1 on fixing this or improving error message. > > In my production code I encountered this bug while trying to test the > term's type object > and I added the space after the method to align stuff: > > is make-temp-path.WHAT === IO::Path, *.not, 'made path is not === > IO::Path'; > is make-temp-dir .WHAT === IO::Path, *.not, 'made dir is not === > IO::Path'; > > The second line crashed. > > The current error doesn't even include a location, so it has the > potential for a tedious bug hunt.
Hit on this bug again. Even while knowing you can't put spaces before .WHAT, it took me a couple of minutes trying to find where this error was coming from.