X-Git-Url: http://nitlanguage.org diff --git a/src/rapid_type_analysis.nit b/src/rapid_type_analysis.nit index bcae37f..73cc176 100644 --- a/src/rapid_type_analysis.nit +++ b/src/rapid_type_analysis.nit @@ -93,7 +93,7 @@ class RapidTypeAnalysis var mtype = callsite.recv var anchor = callsite.anchor if anchor != null then mtype = mtype.anchor_to(callsite.mmodule, anchor) - mtype = mtype.as_notnullable + mtype = mtype.undecorate if mtype isa MClassType then mtype = mtype.mclass.intro.bound_mtype var mproperty = callsite.mproperty var res = live_targets_cache[mtype, mproperty] @@ -465,7 +465,7 @@ class RapidTypeVisitor do mtype = mtype.anchor_to(self.analysis.mainmodule, self.receiver) if mtype isa MNullType then return null - mtype = mtype.as_notnullable + mtype = mtype.undecorate assert mtype isa MClassType assert not mtype.need_anchor return mtype @@ -560,11 +560,13 @@ redef class ASuperstringExpr var object_type = mmodule.object_type var arraytype = mmodule.array_type(object_type) v.add_type(arraytype) - v.add_type(mmodule.native_array_type(object_type)) + var nattype = mmodule.native_array_type(object_type) + v.add_type(nattype) var prop = v.get_method(arraytype, "join") v.add_monomorphic_send(arraytype, prop) var prop2 = v.get_method(arraytype, "with_native") v.add_monomorphic_send(arraytype, prop2) + v.add_monomorphic_send(nattype, v.get_method(nattype, "native_to_s")) end end