In reply to dave_59:
Thank you Dave!
So, In your example, If I replace "module M" with "class M ", the result will be the same.
However, if "A" is not declared in the compilation unit, the compiler will search the instance hierarchy tree of module M(upwarding search)?
if reference "A" in "class M" and "A" is not declared in the compilation unit, the compiler will report compile error directly, it will not search instance hierarchy tree?