nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78f12fe
)
modelbuilder: mclass2nclassdef registers the first occurrence of a class
author
Jean Privat
<jean@pryen.org>
Thu, 12 Jun 2014 17:07:29 +0000
(13:07 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 12 Jun 2014 17:07:29 +0000
(13:07 -0400)
The first one is the good one.
Signed-off-by: Jean Privat <jean@pryen.org>
src/modelize_class.nit
patch
|
blob
|
history
diff --git
a/src/modelize_class.nit
b/src/modelize_class.nit
index
87d28d1
..
5bc395b
100644
(file)
--- a/
src/modelize_class.nit
+++ b/
src/modelize_class.nit
@@
-97,7
+97,9
@@
redef class ModelBuilder
error(nvisibility, "Error: refinement changed the visibility from a {mclass.visibility} to a {mvisibility}")
end
nclassdef.mclass = mclass
- nmodule.mclass2nclassdef[mclass] = nclassdef
+ if not nmodule.mclass2nclassdef.has_key(mclass) then
+ nmodule.mclass2nclassdef[mclass] = nclassdef
+ end
end
# Visit the AST and create the `MClassDef` objects