From: Jean Privat Date: Wed, 12 Feb 2014 14:32:52 +0000 (-0500) Subject: rta: check the type NativeArray before the method with_native in varargs X-Git-Tag: v0.6.4~31^2~6 X-Git-Url: http://nitlanguage.org rta: check the type NativeArray before the method with_native in varargs This is coherent with the other NativeArray stuff in RTA and the way engines do it Signed-off-by: Jean Privat --- diff --git a/src/rapid_type_analysis.nit b/src/rapid_type_analysis.nit index be9ea34..e56951b 100644 --- a/src/rapid_type_analysis.nit +++ b/src/rapid_type_analysis.nit @@ -112,9 +112,9 @@ class RapidTypeAnalysis #elttype = elttype.anchor_to(self.mainmodule, v.receiver) var vararg = self.mainmodule.get_primitive_class("Array").get_mtype([elttype]) v.add_type(vararg) - v.add_monomorphic_send(vararg, self.modelbuilder.force_get_primitive_method(node, "with_native", vararg.mclass, self.mainmodule)) var native = self.mainmodule.get_primitive_class("NativeArray").get_mtype([elttype]) v.add_type(native) + v.add_monomorphic_send(vararg, self.modelbuilder.force_get_primitive_method(node, "with_native", vararg.mclass, self.mainmodule)) end