From 4e5aa755716ca1a09912b9181cf1d491afeeef6a Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Sun, 4 Jan 2015 21:55:06 -0500 Subject: [PATCH] rta: `live_targets` do not crash when the receiver is null Signed-off-by: Jean Privat --- src/rapid_type_analysis.nit | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rapid_type_analysis.nit b/src/rapid_type_analysis.nit index 7881db0..2d9fee4 100644 --- a/src/rapid_type_analysis.nit +++ b/src/rapid_type_analysis.nit @@ -87,8 +87,7 @@ class RapidTypeAnalysis var anchor = callsite.anchor if anchor != null then mtype = mtype.anchor_to(callsite.mmodule, anchor) mtype = mtype.as_notnullable - assert mtype isa MClassType - mtype = mtype.mclass.intro.bound_mtype + if mtype isa MClassType then mtype = mtype.mclass.intro.bound_mtype var mproperty = callsite.mproperty var res = live_targets_cache[mtype, mproperty] if res != null then return res -- 1.7.9.5