+ private fun get_property(v: TypingVisitor, type_recv: MMType, is_implicit_self: Bool, name: Symbol): nullable MMMethod
+ do
+ if type_recv isa MMTypeNone then
+ if name == (once "==".to_symbol) or name == (once "!=".to_symbol) then
+ # Special case on != and == that are allowed for 'null'
+ type_recv = v.type_object.as_nullable
+ else
+ v.error(self, "Error: Method '{name}' call on 'null'.")
+ return null
+ end
+ end
+ var lc = type_recv.local_class
+ var prop: nullable MMMethod = null
+ if lc.has_global_property_by_name(name) then prop = lc.select_method(name)
+ if prop == null and v.local_property.global.is_init then
+ var props = lc.super_methods_named(name)
+ if props.length > 1 then
+ v.error(self, "Error: Ambigous method name '{name}' for {props.join(", ")}. Use explicit designation.")
+ return null
+ else if props.length == 1 then
+ var p = lc[props.first.global]
+ assert p isa MMMethod
+ prop = p
+ end
+
+ end
+ if prop == null then
+ if is_implicit_self then
+ v.error(self, "Error: Method or variable '{name}' unknown in {type_recv}.")
+ else
+ v.error(self, "Error: Method '{name}' doesn't exists in {type_recv}.")
+ end
+ return null
+ end
+ return prop
+ end
+
+ # Get the signature for a local property and a receiver
+ private fun get_signature(v: TypingVisitor, type_recv: MMType, prop: MMMethod, recv_is_self: Bool): MMSignature
+ do
+ prop.global.check_visibility(v, self, v.mmmodule, recv_is_self)
+ var psig = prop.signature_for(type_recv)
+ if not recv_is_self then psig = psig.not_for_self
+ return psig
+ end
+
+ # The invoked method (once computed)
+ redef fun prop do return _prop.as(not null)
+ var _prop: nullable MMMethod