Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #68568] [BUG] Less than awesome error message when passing a named where a positional should be in Rakudo

0 views
Skip to first unread message

Carl Mäsak

unread,
Aug 16, 2009, 7:30:06 AM8/16/09
to bugs-bi...@netlabs.develooper.com
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #68568]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=68568 >


<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

bugs-c...@netlabs.develooper.com

unread,
Aug 16, 2009, 7:36:30 AM8/16/09
to perl6-c...@perl.org
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

perl6-bug...@perl.org

unread,
Oct 29, 2009, 8:03:48 AM10/29/09
to perl6-c...@perl.org
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.

0 new messages