nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f1f6bb
)
modelbuilder: resolve_mtype does not crash when the class is incomplete
author
Jean Privat
<jean@pryen.org>
Fri, 3 Apr 2015 02:34:36 +0000
(09:34 +0700)
committer
Jean Privat
<jean@pryen.org>
Fri, 3 Apr 2015 06:09:35 +0000
(13:09 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>
src/modelbuilder_base.nit
patch
|
blob
|
history
diff --git
a/src/modelbuilder_base.nit
b/src/modelbuilder_base.nit
index
9995338
..
f01fbd8
100644
(file)
--- a/
src/modelbuilder_base.nit
+++ b/
src/modelbuilder_base.nit
@@
-305,7
+305,9
@@
class ModelBuilder
if mtype isa MGenericType then
var mclass = mtype.mclass
for i in [0..mclass.arity[ do
- var bound = mclass.intro.bound_mtype.arguments[i]
+ var intro = mclass.try_intro
+ if intro == null then return null # skip error
+ var bound = intro.bound_mtype.arguments[i]
var nt = ntype.n_types[i]
var mt = resolve_mtype(mmodule, mclassdef, nt)
if mt == null then return null # forward error