jdaugherty commented on PR #3084:
URL: https://github.com/apache/groovy/pull/3084#issuecomment-6747564286

   Rebased on current master (`COMPATIBILITY.md` and 
`CompilerConfiguration.java` conflicted, both appends at the same spot) and 
added one fix on top, b96fa00c30.
   
   **Nested names.** The lookup was gated on `testModuleImports`, but 
`resolveFromStaticInnerClasses` re-enters `resolve` with `(false, true, true)`, 
which tries the default imports and skipped the lookup. With a compiled 
default-package `Proxy` that has a nested `Type`, a separate compile still 
resolved `Proxy.Type` to `java.net.Proxy$Type`, and `new Proxy.Type()` did not 
compile. The gate is now `testDefaultImports`, the condition under which the 
lookup has to come first. `Groovy12555` has three new tests, two of which fail 
without the change, and `COMPATIBILITY.md` describes it. The 6.0.x port branch 
has the same change.
   
   One limit, unchanged by this: with a `.groovy` **source** of `Proxy` on the 
class path rather than a compiled class, a type reference such as a 
`Proxy.Type` field still goes to the default import. An incremental build has 
compiled classes, so I left that alone.
   
   @paulk-asert, are you OK with keeping the source-path lookup for the reasons 
in [my earlier 
reply](https://github.com/apache/groovy/pull/3084#issuecomment-6634947128), or 
do you still prefer class-only for 7? If you do, I will make that change with a 
separate non-caching probe.
   
   @daniellansun, your approval was on 14288a89, before this change. Could you 
take a look at the new commit?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to