First, it looks in the immediate scope, and makes a list of all
functions it can find that has right named (regardless of whether
they’re accessible or even take the right number of parameters).
If name and type mismatch, compiler will bark.
Only if it doesn’t find any at all does it then continue "outward"
into the next enclosing scope and repeat.
If in searching scope there are more than one candidate functions,
the compiler then stops searching and works with the candidates
that it’s found, performing overload resolution and then applying
access rules.
Child class scope: In child class scope, if it found name g, then it will
stop looking for another name in outward scope. just use g, then
found argument number is not match, then compiler bark.