From: Jean Privat Date: Tue, 16 Jun 2015 14:50:28 +0000 (-0400) Subject: compiler: no-on for `AIsaExpr` without a valid `cast_type` X-Git-Tag: v0.7.6~34^2~1 X-Git-Url: http://nitlanguage.org compiler: no-on for `AIsaExpr` without a valid `cast_type` Signed-off-by: Jean Privat --- diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index 221e628..8fae169 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -3044,7 +3044,9 @@ redef class AIsaExpr redef fun expr(v) do var i = v.expr(self.n_expr, null) - return v.type_test(i, self.cast_type.as(not null), "isa") + var cast_type = self.cast_type + if cast_type == null then return null # no-no on broken node + return v.type_test(i, cast_type, "isa") end end