[perl #122746] [BUG] Stringification of AST parameter not captured properly in postfix macro in Rakudo
There is a passing test in S06-macros/unquoting.t now (cmp. commits https://github.com/perl6/roast/commit/054665cfb7 and https://github.com/perl6/roast/commit/d6570538ae). I'm closing this ticket now.
[perl #122746] [BUG] Stringification of AST parameter not captured properly in postfix macro in Rakudo
masak (): masak m: macro postfix:!!($o) { quasi { die Null check failed for , $o.Str unless defined {{{$o}}}; {{{$o}}} } }; say 42!!; my $cookies; my $food = $cookies!! 16:18 +camelia rakudo-moar 51ddd5: OUTPUT«42Null check failed for  in any [...]» masak so close. * masak submits rakudobug masak (it should capture the string '$cookies' in $o.Str, IMO) masak that is, the error message shoulda been 'Null check failed for $cookies' This works now, thanks for moritz++. $ cat RT-122746-code macro postfix:!!($o) { quasi { die Null check failed for , $o.Str unless defined {{{$o}}}; {{{$o}}} } } say 42!!; my $cookies; my $food = $cookies!! masak@siddharta ~/mine/macro-grant $ perl6 RT-122746-code 42 Null check failed for $cookies in any at RT-122746-code:3 in block unit at RT-122746-code:12 Marking ticket as testneeded.
[perl #122746] [BUG] Stringification of AST parameter not captured properly in postfix macro in Rakudo
# New Ticket Created by Carl Mäsak # Please include the string: [perl #122746] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/Ticket/Display.html?id=122746 masak m: macro postfix:!!($o) { quasi { die Null check failed for , $o.Str unless defined {{{$o}}}; {{{$o}}} } }; say 42!!; my $cookies; my $food = $cookies!! 16:18 +camelia rakudo-moar 51ddd5: OUTPUT«42Null check failed for  in any [...]» masak so close. * masak submits rakudobug masak (it should capture the string '$cookies' in $o.Str, IMO) masak that is, the error message shoulda been 'Null check failed for $cookies'