Navigation Menu

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

Signature binding outside of routine calls seems broken #2340

Closed
p6rt opened this issue Jan 28, 2011 · 5 comments
Closed

Signature binding outside of routine calls seems broken #2340

p6rt opened this issue Jan 28, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jan 28, 2011

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

Searchable as RT82946$

@p6rt
Copy link
Author

p6rt commented Jan 28, 2011

From @moritz

10​:08 < moritz_> rakudo​: my ($f, $o, @​a); @​a = 2, 3, 4; :($f, $o, $) :=
\(|@​a); say $f.perl
10​:08 <+p6eval> rakudo 549d2a​: OUTPUT«Not enough positional parameters
passed; got 1 but expected 3␤ in 'infix​:<​:=>' at line 1␤ in main
program body at line 22​:/tmp/eeH_GtWW59␤»

All my attempts to do signature binding result in that error, which is
very LTA - I don't see how an infix operator can receive a different
number than 2 arguments, yet it expects 3 and gets 1 - WTF?

@p6rt
Copy link
Author

p6rt commented Mar 8, 2013

From @jnthn

On Fri Jan 28 01​:15​:55 2011, moritz wrote​:

10​:08 < moritz_> rakudo​: my ($f, $o, @​a); @​a = 2, 3, 4; :($f, $o, $)
:=
\(|@​a); say $f.perl
10​:08 <+p6eval> rakudo 549d2a​: OUTPUT«Not enough positional parameters
passed; got 1 but expected 3␤ in 'infix​:<​:=>' at line 1␤ in main
program body at line 22​:/tmp/eeH_GtWW59␤»

All my attempts to do signature binding result in that error, which is
very LTA - I don't see how an infix operator can receive a different
number than 2 arguments, yet it expects 3 and gets 1 - WTF?

This works now​:

my ($f, $o, @​a); @​a = 2, 3, 4; :($f, $o, $) := @​a; say $f.perl
2

Think that's sufficient for tagging testneeded - there is an issue about
| handling in capture literals, but that can be a separate ticket.

/jnthn

@p6rt
Copy link
Author

p6rt commented Mar 8, 2013

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

@p6rt
Copy link
Author

p6rt commented Aug 11, 2013

From @moritz

now tested in t/spec/S06-signature/outside-subroutine.t

@p6rt
Copy link
Author

p6rt commented Aug 11, 2013

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

@p6rt p6rt closed this as completed Aug 11, 2013
@p6rt p6rt added the testneeded label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant