From aba9c397301cd6e3ce995f7e35f6db22d87547bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Fri, 19 Jul 2013 14:20:36 -0400 Subject: [PATCH] model: rta uses its visitor only to visit FFI extern methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- src/rapid_type_analysis.nit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rapid_type_analysis.nit b/src/rapid_type_analysis.nit index e56951b..820819d 100644 --- a/src/rapid_type_analysis.nit +++ b/src/rapid_type_analysis.nit @@ -153,12 +153,16 @@ class RapidTypeAnalysis v.add_monomorphic_send(v.receiver, auto_super_init) end end - else if npropdef isa AInternMethPropdef or npropdef isa AExternMethPropdef then + else if npropdef isa AInternMethPropdef or + (npropdef isa AExternMethPropdef and npropdef.n_extern != null) then # UGLY: We force the "instantation" of the concrete return type if any var ret = mmethoddef.msignature.return_mtype if ret != null and ret isa MClassType and ret.mclass.kind != abstract_kind and ret.mclass.kind != interface_kind then v.add_type(ret) end + else if npropdef isa AExternMethPropdef then + var nclassdef = npropdef.parent.as(AClassdef) + v.enter_visit(npropdef) else if npropdef isa AExternInitPropdef then v.add_type(v.receiver) else -- 1.7.9.5