On Sun Dec 20 13:52:01 2009, masak wrote:
> <masak> rakudo: class A { method foo($_: $b) {} }; A.new.foo(1, 2)
> <p6eval> rakudo 8dc189:  ( no output )
> <masak> locally, "Too many positional parameters passed; got 3 but
> expected 2"
> <masak> (which is fine, but now...)
> <masak> rakudo: class A { method foo($_: %b) {} }; A.new.foo(1, 2)
> <p6eval> rakudo 8dc189:  ( no output )
> <masak> locally, "Nominal type check failed for parameter
> '11111111111000000000100000101100'; expected Associative but got Int
> instead"
> <masak> (which means that locally, I'm doing this: o.O)
> * masak submits rakudobug
Fixed this one a couple of weeks ago, but failed to find the ticket.
Just ran across it. :-) Now:

> class A { method foo($_: %b) {} }; A.new.foo(1, 2)
Nominal type check failed for parameter '%b'; expected Associative but
got Int instead

> <masak> rakudo: sub foo(%h) {}; foo(1, 2)
> <p6eval> rakudo 8dc189: ''' is not a valid sprintf format [...]
> <masak> something weird is definitely going on here...

And:

> sub foo(%h) {}; foo(1, 2)
Nominal type check failed for parameter '%h'; expected Associative but
got Int instead

Given to moritz++ for a spectest; checking that %h features somewhere in
the error message will probably work nicely.

Thanks,

Jonathan

Reply via email to