modelbuilder_base: Rename some local variables
authorJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Fri, 2 Jun 2017 02:43:40 +0000 (22:43 -0400)
committerJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Fri, 2 Jun 2017 15:05:28 +0000 (11:05 -0400)
Avoid a name conflict in future commits.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

src/modelbuilder_base.nit

index 77ba0d8..1d7b074 100644 (file)
@@ -300,21 +300,21 @@ class ModelBuilder
                end
 
                # Check class
-               var mclass = try_get_mclass_by_qid(qid, mmodule)
-               if mclass != null then
+               var found_class = try_get_mclass_by_qid(qid, mmodule)
+               if found_class != null then
                        var arity = ntype.n_types.length
-                       if arity != mclass.arity then
+                       if arity != found_class.arity then
                                if arity == 0 then
-                                       error(ntype, "Type Error: `{mclass.signature_to_s}` is a generic class.")
-                               else if mclass.arity == 0 then
+                                       error(ntype, "Type Error: `{found_class.signature_to_s}` is a generic class.")
+                               else if found_class.arity == 0 then
                                        error(ntype, "Type Error: `{name}` is not a generic class.")
                                else
-                                       error(ntype, "Type Error: expected {mclass.arity} formal argument(s) for `{mclass.signature_to_s}`; got {arity}.")
+                                       error(ntype, "Type Error: expected {found_class.arity} formal argument(s) for `{found_class.signature_to_s}`; got {arity}.")
                                end
                                return null
                        end
                        if arity == 0 then
-                               res = mclass.mclass_type
+                               res = found_class.mclass_type
                                if ntype.n_kwnullable != null then res = res.as_nullable
                                ntype.mtype = res
                                return res
@@ -325,7 +325,7 @@ class ModelBuilder
                                        if mt == null then return null # Forward error
                                        mtypes.add(mt)
                                end
-                               res = mclass.get_mtype(mtypes)
+                               res = found_class.get_mtype(mtypes)
                                if ntype.n_kwnullable != null then res = res.as_nullable
                                ntype.mtype = res
                                return res
@@ -426,9 +426,9 @@ class ModelBuilder
 
                if ntype.checked_mtype then return mtype
                if mtype isa MGenericType then
-                       var mclass = mtype.mclass
-                       for i in [0..mclass.arity[ do
-                               var intro = mclass.try_intro
+                       var found_class = mtype.mclass
+                       for i in [0..found_class.arity[ do
+                               var intro = found_class.try_intro
                                if intro == null then return null # skip error
                                var bound = intro.bound_mtype.arguments[i]
                                var nt = ntype.n_types[i]