76b2b9fc66
This commit covers object vs static member case, when no companion objects are 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 two erroneous candidates without companions. After it tries to resolve Some as a qualifier, but we have no scope with a single qualifier. That's why we finally report NONE_APPLICABLE on candidates with companions.