# New Ticket Created by  Lloyd Fournier 
# Please include the string:  [perl #125715]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=125715 >


MyMod.pm
-----
class Foo {}
#Foo aliased to Bar
sub EXPORT(|){ { 'Bar' => Foo } }

main.pl
----------
use lib 'lib';
use MyMod;

my class Baz {
    has Bar $.bar;
}

sub test(Bar $) { say "works!" }

test(Bar.new); #->works!

Baz.new(bar => Bar.new );
#!Type check failed in assignment to '$!bar'; expected 'Foo' but got 'Foo'
=====

perl6 -v
This is perl6 version 2015.07.1-12-g174049f built on MoarVM version 2015.07

Reply via email to