From: gfx Date: Mon, 19 Oct 2009 09:26:50 +0000 (+0900) Subject: Fix subtyping issue X-Git-Tag: 0.40~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c4b28dd24bdccc23e62596b1b2a18b4df26d76dd;p=gitmo%2FMouse.git Fix subtyping issue --- diff --git a/lib/Mouse/Meta/TypeConstraint.pm b/lib/Mouse/Meta/TypeConstraint.pm index 9dd67db..d4a9284 100644 --- a/lib/Mouse/Meta/TypeConstraint.pm +++ b/lib/Mouse/Meta/TypeConstraint.pm @@ -101,11 +101,11 @@ sub compile_type_constraint{ my @checks; for(my $parent = $self->parent; defined $parent; $parent = $parent->parent){ if($parent->{hand_optimized_type_constraint}){ - push @checks, $parent->{hand_optimized_type_constraint}; + unshift @checks, $parent->{hand_optimized_type_constraint}; last; # a hand optimized constraint must include all the parents } elsif($parent->{constraint}){ - push @checks, $parent->{constraint}; + unshift @checks, $parent->{constraint}; } }