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

Fix pkg obj prefix of opaque tp ext meth #21527

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

Conversation

dwijnand
Copy link
Member

@dwijnand dwijnand commented Sep 1, 2024

TypeOps.makePackageObjPrefixExplicit is a part of accessibleType,
which is called on the result of findRef in typedIdent. But in
tryExtension it's not. We could fix it in the usage of the results in
tryExtension, but I thought perhaps we could fix it for all call
sites, by handling it within findRef.

Fixes #18097

TypeOps.makePackageObjPrefixExplicit is a part of `accessibleType`,
which is called on the result of findRef in typedIdent.  But in
`tryExtension` it's not.  We could fix it in the usage of the results in
`tryExtension`, but I thought perhaps we could fix it for all call
sites, by handling it within findRef.
@dwijnand dwijnand marked this pull request as ready for review September 2, 2024 01:08
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine but could profit from a refactoring.

  • Move makePackageObjPrefixExplciit from TypeOps to TypeUtils and make it an extension method on Type
  • Drop the extension method in findRef.

@odersky odersky assigned dwijnand and unassigned odersky Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

top level extension method dealiases opaque type in result type
2 participants