Merge: type works: handle implicitly fixed formal parameters
[nit.git] / src / typing.nit
index 2a21437..8dee027 100644 (file)
@@ -191,7 +191,7 @@ private class TypeVisitor
 
                if sup == sub then
                        self.modelbuilder.warning(node, "Warning: Expression is already a {sup}.")
-               else if self.is_subtype(sub, sup) and not sup.need_anchor then
+               else if self.is_subtype(sub, sup) then
                        self.modelbuilder.warning(node, "Warning: Expression is already a {sup} since it is a {sub}.")
                end
                return sup
@@ -252,7 +252,7 @@ private class TypeVisitor
 
                assert mproperty isa MMethod
 
-               if is_toplevel_context and recv_is_self and not mproperty.is_toplevel and name != "sys" and name != "exit" and name != "args" then
+               if is_toplevel_context and recv_is_self and not mproperty.is_toplevel and name != "sys" and name != "exit" then
                        # FIXME named methods are here as a workaround
                        error(node, "Error: '{name}' is not a top-level method, thus need a receiver.")
                end