model: Don’t blacklist in specialization rules
authorJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Fri, 9 Jun 2017 15:06:33 +0000 (11:06 -0400)
committerJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Tue, 13 Jun 2017 20:13:30 +0000 (16:13 -0400)
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

src/model/model.nit

index 11592d7..28303d0 100644 (file)
@@ -2602,12 +2602,10 @@ class MClassKind
                else if self == extern_kind then
                        # only compatible with themselves
                        return self == other
-               else if other == enum_kind or other == extern_kind then
-                       # abstract_kind and concrete_kind are incompatible
-                       return false
+               else
+                       # assert self == abstract_kind or self == concrete_kind
+                       return other == abstract_kind or other == concrete_kind
                end
-               # remain only abstract_kind and concrete_kind
-               return true
        end
 end