Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STD.pm accepts $: as an anonymous invocant parameter followed by a param-separating colon, Rakudo doesn't #1291

Closed
p6rt opened this issue Sep 17, 2009 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 17, 2009

Migrated from rt.perl.org#69206 (status was 'resolved')

Searchable as RT69206$

@p6rt
Copy link
Author

p6rt commented Sep 17, 2009

From @masak

<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?

@p6rt
Copy link
Author

p6rt commented Sep 18, 2009

From @pmichaud

Now fixed in a7ac444 -- just needs tests.

Thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Sep 18, 2009

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 26, 2009

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Sep 26, 2009
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant