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

[perl #112970] [BUG] LTA, misleading error message when a typed array in a signature fails to bind in Rakudo

1 view
Skip to first unread message

Carl Mäsak

unread,
May 17, 2012, 11:06:23 AM5/17/12
to bugs-bi...@rt.perl.org
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #112970]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112970 >


<spider-mario> r: sub f(Int @x) {}; f([])
<p6eval> rakudo d43876: OUTPUT«Nominal type check failed for parameter
'@x'; expected Positional but got Array instead [...]
<jnthn> grr, really need to fix that to say Positional[Int]
<masak> spider-mario: the error message is misleading.
* masak submits rakudobug

Christian Bartolomaeus via RT

unread,
Oct 5, 2014, 6:56:44 AM10/5/14
to perl6-c...@perl.org
The error message now mentions that 'Positional[Int]' is expected:

> sub f(Int @x) {}; f( [] )
Type check failed in binding @x; expected 'Positional[Int]' but got 'Array'
in sub f at <unknown file>:1
in block <unit> at <unknown file>:1

A test was added to S14-roles/parameterized-type.t with the following commit: https://github.com/perl6/roast/commit/ada98bc5f149c99d50010aa307910f42c9ebb1a4.
0 new messages