redef class AExternCall
# Verify this explicit declaration of call from C and collect all relevant callbacks
- fun verify_and_collect(npropdef: AExternPropdef, callback_set: ForeignCallbackSet,
+ fun verify_and_collect(npropdef: AMethPropdef, callback_set: ForeignCallbackSet,
toolcontext: ToolContext) is abstract
end
do
var mmodule = npropdef.mpropdef.mclassdef.mmodule
var mclassdef = npropdef.mpropdef.mclassdef
- var nclassdef = toolcontext.modelbuilder.mclassdef2nclassdef[mclassdef]
var mclass_type = mclassdef.bound_mtype
- var mtype = toolcontext.modelbuilder.resolve_mtype(nclassdef, n_type)
+ var mtype = toolcontext.modelbuilder.resolve_mtype(mmodule, mclassdef, n_type)
if mtype == null then return
do
var mmodule = npropdef.mpropdef.mclassdef.mmodule
var mclassdef = npropdef.mpropdef.mclassdef
- var nclassdef = toolcontext.modelbuilder.mclassdef2nclassdef[mclassdef]
- var mtype = toolcontext.modelbuilder.resolve_mtype(nclassdef, n_type)
+ var mtype = toolcontext.modelbuilder.resolve_mtype(mmodule, mclassdef, n_type)
if mtype == null then return
if not mtype isa MClassType then
do
callback_set.supers.add( new MExplicitSuper( npropdef.mpropdef.as(not null) ) )
callback_set.types.add( npropdef.mpropdef.mclassdef.mclass.mclass_type )
+ npropdef.mpropdef.has_supercall = true
end
end
redef fun verify_and_collect(npropdef, callback_set, toolcontext)
do
- var parent_aclassdef = npropdef.parent.as(AClassdef)
- toolcontext.modelbuilder.resolve_mtype_unchecked(parent_aclassdef, n_from_type, true)
- toolcontext.modelbuilder.resolve_mtype_unchecked(parent_aclassdef, n_to_type, true)
+ var mclassdef = npropdef.mpropdef.mclassdef
+ var mmodule = mclassdef.mmodule
+ toolcontext.modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, n_from_type, true)
+ toolcontext.modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, n_to_type, true)
super
end
end
redef fun verify_and_collect(npropdef, callback_set, toolcontext)
do
- var parent_aclassdef = npropdef.parent.as(AClassdef)
- toolcontext.modelbuilder.resolve_mtype_unchecked(parent_aclassdef, n_type, true)
+ var mclassdef = npropdef.mpropdef.mclassdef
+ var mmodule = mclassdef.mmodule
+ toolcontext.modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, n_type, true)
super
end
end
redef fun from_mtype do return n_type.mtype.as_nullable
redef fun to_mtype do
var mtype = n_type.mtype.as(not null)
- if mtype isa MNullableType then return mtype.mtype
+ mtype = mtype.as_notnullable
return mtype
end
redef fun verify_and_collect(npropdef, callback_set, toolcontext)
do
- var parent_aclassdef = npropdef.parent.as(AClassdef)
- toolcontext.modelbuilder.resolve_mtype_unchecked(parent_aclassdef, n_type, true)
+ var mclassdef = npropdef.mpropdef.mclassdef
+ var mmodule = mclassdef.mmodule
+ toolcontext.modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, n_type, true)
super
end
end