# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #107722]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=107722 >


21:04 < moritz> nom: $_ = 'a'; /a/ ff /a/;
21:04 <+p6eval> nom 327fc9: OUTPUT«Method 'match' not found for invocant
of class 'Any'␤  in method Bool at src/gen/CORE.setting:7239␤  in sub
infix:<ff> at src/gen/CORE.setting:8502␤  in block <anon>  at
/tmp/YknKE09sGg:1␤  in <anon> at /tmp/YknKE09sGg:1␤»

the $_ that /a/ matches against ends up being Any, not 'a'. Compare with:

21:04 < moritz> nom: $_ = 'a'; /a/ || /a/;
21:04 <+p6eval> nom 327fc9:  ( no output )

works fine there

21:05 < sorear> nom: $_ = 'a'; m/a/ ff m/a/
21:05 <+p6eval> nom 327fc9:  ( no output )
21:05 < sorear> I think I see the problem
21:06 < moritz> sorear: what is it?
21:07 < moritz> ah, probably the   sub infix:<ff>($a as Bool, $b as Bool)
21:07 < sorear> moritz: 'ff' is probably calling a helper sub, which
calls .Bool on the arguments ... but $_ doesn't exist in the helper sub
21:07 < moritz> tries to coerce the regex to Bool, but no $_ present anymore

Reply via email to