nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6189f88
)
model: fatal error, instead of abort if more that one primitive class
author
Jean Privat
<jean@pryen.org>
Sat, 26 Apr 2014 03:04:07 +0000
(23:04 -0400)
committer
Jean Privat
<jean@pryen.org>
Sat, 26 Apr 2014 14:39:22 +0000
(10:39 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/model/model.nit
patch
|
blob
|
history
diff --git
a/src/model/model.nit
b/src/model/model.nit
index
bebfa5c
..
47b0117
100644
(file)
--- a/
src/model/model.nit
+++ b/
src/model/model.nit
@@
-223,7
+223,12
@@
redef class MModule
print("Fatal Error: no primitive class {name}")
exit(1)
end
- assert cla.length == 1 else print cla.join(", ")
+ if cla.length != 1 then
+ var msg = "Fatal Error: more than one primitive class {name}:"
+ for c in cla do msg += " {c.full_name}"
+ print msg
+ exit(1)
+ end
return cla.first
end