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

Less than awesome error message when passing a named where a positional should be in Rakudo #1229

Closed
p6rt opened this issue Aug 16, 2009 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 16, 2009

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

Searchable as RT68568$

@p6rt
Copy link
Author

p6rt commented Aug 16, 2009

From @masak

<masak> rakudo​: sub foo($positional, :$named) {}; foo(​:named)
<p6eval> rakudo 0d4fe0​: OUTPUT«invalid arg type in named portion of
args␤in sub foo [...]
<masak> it doesn't say the name of the arg that cause the error, or
the name of the arg that it expected
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Aug 16, 2009

From @masak

On Sun Aug 16 04​:30​:06 2009, masak wrote​:

<masak> rakudo​: sub foo($positional, :$named) {}; foo(​:named)
<p6eval> rakudo 0d4fe0​: OUTPUT«invalid arg type in named portion of
args␤in sub foo [...]
<masak> it doesn't say the name of the arg that cause the error, or
the name of the arg that it expected
* masak submits rakudobug

<pmurias> masak​: it should also print out the (type of the) thing supplied
<masak> pmurias​: aye, good idea. and perhaps of the thing expected.
<pmurias> that for sure
* masak adds this to the RT ticket

@p6rt
Copy link
Author

p6rt commented Aug 16, 2009

From [Unknown Contact. See original ticket]

On Sun Aug 16 04​:30​:06 2009, masak wrote​:

<masak> rakudo​: sub foo($positional, :$named) {}; foo(​:named)
<p6eval> rakudo 0d4fe0​: OUTPUT«invalid arg type in named portion of
args␤in sub foo [...]
<masak> it doesn't say the name of the arg that cause the error, or
the name of the arg that it expected
* masak submits rakudobug

<pmurias> masak​: it should also print out the (type of the) thing supplied
<masak> pmurias​: aye, good idea. and perhaps of the thing expected.
<pmurias> that for sure
* masak adds this to the RT ticket

@p6rt
Copy link
Author

p6rt commented Aug 16, 2009

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 28, 2009

From @moritz

On Sun Aug 16 04​:30​:06 2009, masak wrote​:

<masak> rakudo​: sub foo($positional, :$named) {}; foo(​:named)
<p6eval> rakudo 0d4fe0​: OUTPUT«invalid arg type in named portion of
args␤in sub foo [...]
<masak> it doesn't say the name of the arg that cause the error, or
the name of the arg that it expected
* masak submits rakudobug

22​:32 <@​moritz_> rakudo​: sub foo($positional, :$named) {}; foo(​:named)
22​:32 <+p6eval> rakudo 6a43a3​: OUTPUT«Not enough positional parameters
passed; got 0 but expected 1␤in Main (file src/gen_setting.pm, line 295)␤»

That's about as awesome as it gets, though I don't know if it makes
sense to write specific tests for it since error messages aren't
standardized yet.

Can we close the ticket without a test?

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Oct 29, 2009

From @masak

On Wed Oct 28 14​:34​:59 2009, moritz wrote​:

On Sun Aug 16 04​:30​:06 2009, masak wrote​:

<masak> rakudo​: sub foo($positional, :$named) {}; foo(​:named)
<p6eval> rakudo 0d4fe0​: OUTPUT«invalid arg type in named portion of
args␤in sub foo [...]
<masak> it doesn't say the name of the arg that cause the error, or
the name of the arg that it expected
* masak submits rakudobug

22​:32 <@​moritz_> rakudo​: sub foo($positional, :$named) {}; foo(​:named)
22​:32 <+p6eval> rakudo 6a43a3​: OUTPUT«Not enough positional parameters
passed; got 0 but expected 1␤in Main (file src/gen_setting.pm, line 295)␤»

That's about as awesome as it gets, though I don't know if it makes
sense to write specific tests for it since error messages aren't
standardized yet.

Can we close the ticket without a test?

Yes, I think so. Resolving.

@p6rt
Copy link
Author

p6rt commented Oct 29, 2009

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

@p6rt p6rt closed this as completed Oct 29, 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