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

Error says wanted number of arguments is 1; passed 1 #6426

Open
p6rt opened this issue Aug 4, 2017 · 3 comments
Open

Error says wanted number of arguments is 1; passed 1 #6426

p6rt opened this issue Aug 4, 2017 · 3 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Aug 4, 2017

Migrated from rt.perl.org#131842 (status was 'open')

Searchable as RT131842$

@p6rt
Copy link
Author

p6rt commented Aug 4, 2017

From @zoffixznet

20​:49 ufobat m​: sub foo (|a, :%e) { a.perl.say }; foo(1, :e( a => 1))
20​:49 camelia rakudo-moar abf1cf​: OUTPUT​: «Too many positionals passed to 'foo'; expected 1 argument but got 1? in sub foo at <tmp> line 1? in block <unit> at <tmp> line 1??»

@p6rt
Copy link
Author

p6rt commented Aug 5, 2017

From @lizmat

On 5 Aug 2017, at 00​:43, Zoffix Znet (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Zoffix Znet
# Please include the string​: [perl #​131842]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131842 >

20​:49 ufobat m​: sub foo (|a, :%e) { a.perl.say }; foo(1, :e( a => 1))
20​:49 camelia rakudo-moar abf1cf​: OUTPUT​: «Too many positionals passed to 'foo'; expected 1 argument but got 1? in sub foo at <tmp> line 1? in block <unit> at <tmp> line 1??»

This should probably be a compile time error, as​:

  $ 6 'sub foo (​:%e, |a) { a.perl.say }; foo(1, :e( a => 1))'
  \(1)

works fine. Well, fsvo :)

@p6rt
Copy link
Author

p6rt commented Aug 5, 2017

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

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant