nitc :: ModelBuilder :: check_sametype
sub
and sup
are equvalent types.Do not display an error message.
This method is used a an entry point for the modelize phase to test static equivalent types. Some refinements could redefine it to collect statictics.
# Check that `sub` and `sup` are equvalent types.
# Do not display an error message.
#
# This method is used a an entry point for the modelize phase to test static equivalent types.
# Some refinements could redefine it to collect statictics.
fun check_sametype(node: ANode, mmodule: MModule, anchor: nullable MClassType, sub, sup: MType): Bool
do
return sub.is_subtype(mmodule, anchor, sup) and sup.is_subtype(mmodule, anchor, sub)
end
src/modelbuilder_base.nit:520,2--528,4