On Apr 20, 2020, at 3:32 PM, Dan Smith <daniel.sm...@oracle.com> wrote: > > My point: there are no references to 'A' inside the body. The only reference > to 'A' in this program unambiguously refers to the top-level A. > > You seem to be assuming that there will be resolution problems involved in > checking the implicit members. And my response is that it's not our job to > perform name resolution for implicit members—they are defined more abstractly > than that. Specifically, the return type of the 'a' method is the type > referenced by the type name 'A' appearing after 'record B(' in the program, > as it is resolved *at that location*.
Perhaps this sort of question can be avoided if we ensure that desugaring pseudocode specifies that introduced occurrences of types are not re-resolved at their introduced points. One way to do this (with overkill) is to make sure there are fake package prefixes on introduced occurrences: record R(A x) extends AnotherADeclarer { } (where A is fully qualified as pa.A) => final class R extends AnotherADeclarer { pa.A x; }