You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<masak> rakudo: class A { method foo(::T $ :) { say T.perl } }; A.new.foo
<p6eval> rakudo 2953ac: OUTPUT«A»
<masak> std: class A { method foo(::T $:) {} }
<p6eval> std 28279: OUTPUT«ok 00:03 40m»
<masak> rakudo: class A { method foo(::T $:) {} }
<p6eval> rakudo 2953ac: OUTPUT«Invalid twigil used in signature parameter. [...]
* masak cackles
<masak> pmichaud: is it reasonable to expect Rakudo to parse the above
'$:' as '$ :'
<pmichaud> is std parsing it that way?
<masak> good question.
<masak> it's not throwing an error, at least.
<TimToady> it has a param sep of ':'
<TimToady> so I think it's making it the invocant
<pmichaud> okay
<pmichaud> that's fine -- that's what masak++ is asking for
<pmichaud> let's see what Rakudo is doing
<TimToady> $: requires a name at STD:1783
<pmichaud> yes, I see that
<TimToady> I don't know why param_var isn't slurping it as a twigil though
<pmichaud> right, that's my point :)
<pmichaud> looks like param_var wants a \w after the <twigil>
<pmichaud> [<?before <.twigil>\w> <twigil>]?
<TimToady> line 3062, yes
<TimToady> that would be it
<pmichaud> Rakudo doesn't have that check.
<pmichaud> We can add it.
<masak> \o/
<masak> pmichaud: should I submit this to RT?
<pmichaud> sure.
* masak makes it so
<TimToady> why do I get the feeling that colon is overloaded to within
an inch of its life already?
Migrated from rt.perl.org#69206 (status was 'resolved')
Searchable as RT69206$
The text was updated successfully, but these errors were encountered: