More type constraint fixes for edge cases in is_a_type_of and is_a_subtype_of when...
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint / Registry.pm
index d959632..ff2157c 100644 (file)
@@ -33,7 +33,7 @@ sub new {
 
 sub has_type_constraint {
     my ($self, $type_name) = @_;
-    exists $self->type_constraints->{$type_name} ? 1 : 0
+    ($type_name and exists $self->type_constraints->{$type_name}) ? 1 : 0
 }
 
 sub get_type_constraint {