# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #77338]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=77338 >


<masak> rakudo: role A[::T?] {}; class B does A[] {}; say "alive"
<p6eval> rakudo 7b0031: OUTPUT«===SORRY!===␤Unable to parse
def_module_name, couldn't find final ']' at line 22␤»
* masak submits rakudobug
<masak> the Lion roars again!
<TimToady> std: role A[::T?] {}; class B does A[] {}; say "alive"
<p6eval> std 32075: OUTPUT«===SORRY!===␤Unable to
parse generic role [...]
<masak> ...or not.
<TimToady> I don't think that syntax is legal
<masak> I'm starting to suspect you're right...
<TimToady> std: role A[::T $?] {}; class B does A[] {}; say "alive"
<p6eval> std 32075: OUTPUT«ok 00:01 119m␤»
<masak> oh right.
<TimToady> you can't put ? on a type constraint, which ::T is parsed as
<masak> makes sense.
<masak> rakudo: role A[::T $?] {}; class B does A[] {}; say "alive"
<p6eval> rakudo 7b0031: OUTPUT«===SORRY!===␤In signature parameter,
'$?', it is illegal to use '?' twigil [...]
* masak submits this other bug instead :)
<TimToady> heh, STD's twigils require a following \w
<masak> rakudo: role A[::T $?] {}
<p6eval> rakudo 7b0031: OUTPUT«===SORRY!===␤In signature parameter,
'$?', it is illegal to use '?' twigil [...]
<masak> rakudo: sub foo(::T $?) {}
<p6eval> rakudo 7b0031: OUTPUT«===SORRY!===␤In signature parameter,
'$?', it is illegal to use '?' twigil [...]
<TimToady> std: role A[::T $ ?] {}; class B does A[] {}; say "alive"
<masak> I agree; it's not a twigil unless there's something coming after it :)

Reply via email to