nitc :: MClass :: get_position_methods
cl
in self
if cl
has an invariant position in self,Otherwise return a negative position
# Return the position of the method's block of class `cl` in `self` if `cl` has an invariant position in self,
# Otherwise return a negative position
fun get_position_methods(cl: MClass): Int
do
# The class has an invariant position in all subclasses
if cl.position_methods > 0 then return cl.position_methods
# The position has an invariant position for this class and its subclasses only
if positions_methods.has_key(cl) then
var pos = positions_methods[cl]
if pos > 0 then return pos
return -1
end
# No invariant position at all, the caller must use a multiple inheritance implementation
return -1
end
src/vm/virtual_machine.nit:823,2--839,4