start removing implicit properties
[nit.git] / src / syntax / syntax_base.nit
index 8a48e25..d1fc546 100644 (file)
@@ -294,6 +294,8 @@ special Visitor
                if subtype < stype then
                        return true
                end
+               #error(n, "Type error: expected {stype}'{stype.module}, got {subtype}'{subtype.module}")
+               #abort
                error(n, "Type error: expected {stype}, got {subtype}")
                return false
        end
@@ -435,7 +437,7 @@ redef class AType
                                v.error(self, "Type error: formal type {name} cannot have formal parameters.")
                                return null
                        end
-                       var t = cla.get_type.select_virtual_type(name).stype
+                       var t = cla.get_type.select_virtual_type(name).stype_for(cla.get_type)
                        if t == null then
                                v.error(self, "Type error: circular definition in formal type {name}.")
                                return null