From: Alexis Laferrière Date: Fri, 19 Jul 2013 18:20:36 +0000 (-0400) Subject: model: rta uses its visitor only to visit FFI extern methods X-Git-Tag: v0.6.4~27^2 X-Git-Url: http://nitlanguage.org model: rta uses its visitor only to visit FFI extern methods Signed-off-by: Alexis Laferrière --- 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