602801dcfd
This commit covers object vs companion member vs static member case but now we have two different companions (first is empty) in the scope. K1 reports UNRESOLVED_REFERENCE here, probably due to ambiguity. About K2, while resolving Some.foo it first tries to resolve Some as a "general" variable access, and gets some/Some & some2/Some because both of them have a companion. This means ambiguity. After it tries to resolve Some as a qualifier, but we have no scope with a single qualifier, so finally we prefer to report ambiguity from variable access resolve.