typing: allow `new` on interface and abstract classes that have a `new`-factory
[nit.git] / src / vm.nit
index 6d9e0d5..3807ab7 100644 (file)
@@ -17,7 +17,7 @@
 # Implementation of the Nit virtual machine
 module vm
 
-intrude import interpreter::naive_interpreter
+import interpreter::naive_interpreter
 import model_utils
 import perfect_hashing
 
@@ -106,7 +106,6 @@ class VirtualMachine super NaiveInterpreter
                # Sub can be discovered inside a Generic type during the subtyping test
                if not sub.mclass.loaded then create_class(sub.mclass)
 
-               if anchor == null then anchor = sub
                if sup isa MGenericType then
                        var sub2 = sub.supertype_to(mainmodule, anchor, sup.mclass)
                        assert sub2.mclass == sup.mclass