name
on the type recv
# Try to get the primitive method named `name` on the type `recv`
fun try_get_primitive_method(name: String, recv: MClass): nullable MMethod
do
var props = self.model.get_mproperties_by_name(name)
if props == null then return null
var res: nullable MMethod = null
var recvtype = recv.intro.bound_mtype
for mprop in props do
assert mprop isa MMethod
if not recvtype.has_mproperty(self, mprop) then continue
if res == null then
res = mprop
else if res != mprop then
print_error("Fatal Error: ambigous property name '{name}'; conflict between {mprop.full_name} and {res.full_name}")
abort
end
end
return res
end
src/model/model.nit:365,2--383,4