src: use MFormalType for type checks when it makes sense
[nit.git] / src / model / model.nit
index a5aeb76..bace060 100644 (file)
@@ -713,7 +713,7 @@ abstract class MType
                # Now the case of direct null and nullable is over.
 
                # If `sub` is a formal type, then it is accepted if its bound is accepted
-               while sub isa MParameterType or sub isa MVirtualType do
+               while sub isa MFormalType do
                        #print "3.is {sub} a {sup}?"
 
                        # A unfixed formal type can only accept itself
@@ -737,7 +737,7 @@ abstract class MType
                assert sub isa MClassType # It is the only remaining type
 
                # A unfixed formal type can only accept itself
-               if sup isa MParameterType or sup isa MVirtualType then
+               if sup isa MFormalType then
                        return false
                end