# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #118063]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=118063 >
<lizmat> r: sub a ( $a=1, --> Hash ) { say $a; my %h }; say a(2)
<camelia> rakudo 8d2ec9: OUTPUT«2().hash»
<lizmat> r: sub a ( $a=1 --> Hash ) { say $a; my %h }; say a(2)
<camelia> rakudo 8d2ec9: OUTPUT«===SORRY!===Missing blockat
/tmp/NxD226NWlT:1------> sub a ( $a=1 --> Hash ⏏) { say $a; my %h };
say a(2) expecting any of: postfix infix stopper
infix or meta-infix prefix or term …
<lizmat> for some reason, if we have a default, we need a comma there
<lizmat> r: sub a ( $a --> Hash ) { say $a; my %h }; say a(2)
<camelia> rakudo 8d2ec9: OUTPUT«2().hash»
* masak submits rakudobug for the required comma
I have a feeling I know what's up. The default puts the parser in EXPR
mode. The '-->' should be a stopper, but it isn't, so it gets parsed
as '- ->', binary minus and a pointy. The Hash gets gobbled up as a
parameter, and then the parser expects a block, not ')'. This is
consistent with the error message.