X-Git-Url: http://nitlanguage.org diff --git a/src/metrics/detect_covariance.nit b/src/metrics/detect_covariance.nit index 643679a..ba6a684 100644 --- a/src/metrics/detect_covariance.nit +++ b/src/metrics/detect_covariance.nit @@ -494,7 +494,7 @@ redef class MType if anchor == null then anchor = sub # UGLY: any anchor will work var resolved_sub = sub.anchor_to(mmodule, anchor) var res = resolved_sub.collect_mclasses(mmodule).has(sup.mclass) - if res == false then return false + if not res then return false if not sup isa MGenericType then return true var sub2 = sub.supertype_to(mmodule, anchor, sup.mclass) assert sub2.mclass == sup.mclass @@ -502,10 +502,10 @@ redef class MType var sub_arg = sub2.arguments[i] var sup_arg = sup.arguments[i] res = sub_arg.is_subtype(mmodule, anchor, sup_arg) - if res == false then return false + if not res then return false # The two new lines res = sup_arg.is_subtype(mmodule, anchor, sub_arg) - if res == false then return false + if not res then return false # End of the two new lines end return true