scope: Adding variable verification
[nit.git] / src / semantize / scope.nit
index 3374951..7d9d5c8 100644 (file)
@@ -268,6 +268,11 @@ redef class AParam
        var variable: nullable Variable
        redef fun accept_scope_visitor(v)
        do
+               if variable != null then
+                       v.register_variable(self.n_id, variable.as(not null))
+                       return
+               end
+
                super
                var nid = self.n_id
                var variable = new Variable(nid.text)