$tc->coerce() throws an error if it has no coercion, as Moose's tc does.
[gitmo/Mouse.git] / xs-src / MouseAttribute.xs
index 2b3e621..7b25881 100644 (file)
@@ -54,7 +54,7 @@ mouse_build_xa(pTHX_ SV* const attr) {
             }
         }
 
-        if(predicate_calls(attr, "should_coerce")){
+        if(predicate_calls(attr, "should_coerce") && predicate_calls(tc, "has_coercion")){
             flags |= MOUSEf_ATTR_SHOULD_COERCE;
         }