Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve name when named imp is behind wild imps #21888

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 31, 2024

  1. Resolve name when named imp is behind wild imps

    When a named import (such as `import bug.util.List`) is defined before
    two clashing wildcard imports (`import bug.util.*; import java.util.*`)
    the name "List" should resolve to it, rather than a resolution error
    being emitted.
    
    This was due to the fact that `findRefRecur` didn't return the
    precedence at which it found that import, `checkImportAlternatives` used
    the `prevPrec` to `checkNewOrShadowed`.  Now we check against the entire
    `foundResult`, allowing an early named import to be picked over later
    wildcard imports.
    dwijnand committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    2874097 View commit details
    Browse the repository at this point in the history