From 4a252bcb2062f563eefd9880a12749bf056f809e Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Tue, 15 Jul 2014 15:15:44 -0400 Subject: [PATCH] modelize_property: do not crash if mtype is null in check_visibility Signed-off-by: Jean Privat --- src/modelize_property.nit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modelize_property.nit b/src/modelize_property.nit index 5a0ece8..159523b 100644 --- a/src/modelize_property.nit +++ b/src/modelize_property.nit @@ -205,7 +205,11 @@ redef class ModelBuilder # No error, try to go deeper in generic types if node isa AType then - for a in node.n_types do check_visibility(a, a.mtype.as(not null), mpropdef) + for a in node.n_types do + var t = a.mtype + if t == null then continue # Error, thus skipped + check_visibility(a, t, mpropdef) + end else if mtype isa MGenericType then for t in mtype.arguments do check_visibility(node, t, mpropdef) end -- 1.7.9.5