On Wed, 06 Dec 2017 01:59:42 -0800, d...@zwell.net wrote:
> A git bisect showed that this error began in commit
> 22b4ef05b1f72b50d63e4599d5e037bccf1f08ed, but there must be have been
> an
> underlying problem that was already present, since this commit did not
> change the type system.
> 
> On Fri, Dec 1, 2017 at 6:00 PM perl6 via RT <perl6-bugs-
> follo...@perl.org>
> wrote:
> 
> > Greetings,
> >
> > This message has been automatically generated in response to the
> > creation of a trouble ticket regarding:
> >         "[BUG] type constraints to Array[Pair] don't work when
> > precompiled",
> > a summary of which appears below.
> >
> > There is no need to reply to this message right now.  Your ticket has
> > been
> > assigned an ID of [perl #132525].
> >
> > Please include the string:
> >
> > [perl #132525]
> >
> > in the subject line of all future correspondence about this issue. To
> > do
> > so,
> > you may reply to this message.
> >
> > Thank you,
> > perl6-bugs-follo...@perl.org
> >
> > -------------------------------------------------------------------------
> > The following function runs fine when it's not defined in an external
> > file:
> >
> > our sub get-array(--> Array[Pair]) {
> >   return my Pair @pairs;
> > }
> >
> > But when if you put the above code in a module and run it with:
> > perl6 -I. -MMyModule -e 'MyModule::get-array'
> >
> > The output is:
> > Type check failed for return value; expected Array[Pair] but got
> > Array[Pair].new()
> >   in sub get-array at MyModule.pm6 (MyModule) line 2
> >
> > Tested with:
> > Rakudo version 2017.10 built on MoarVM version 2017.10
> > Rakudo version 2017.10-196-gfff43fd70 built on MoarVM version
> > 2017.10-77-gb9a01f75
> >
> >


These two tickets have the same symptoms:

https://rt.perl.org/Ticket/Display.html?id=128287#ticket-history
https://rt.perl.org/Ticket/Display.html?id=127001#ticket-history

Reply via email to