Skip to content

Fix Java lookups #12070

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

Merged
merged 1 commit into from
Apr 16, 2021
Merged

Fix Java lookups #12070

merged 1 commit into from
Apr 16, 2021

Conversation

BarkingBad
Copy link
Contributor

No description provided.

@BarkingBad BarkingBad requested a review from abgruszecki April 12, 2021 17:38
@BarkingBad BarkingBad linked an issue Apr 12, 2021 that may be closed by this pull request
@@ -108,7 +108,7 @@ trait MemberLookup {
given dotc.core.Contexts.Context = quotes.asInstanceOf[scala.quoted.runtime.impl.QuotesImpl].ctx
val sym = rsym.asInstanceOf[dotc.core.Symbols.Symbol]
// note: Predef has .info = NoType for some reason
sym.isCompleted && sym.info.exists
(sym.isCompleted && sym.info.exists) || sym.infoOrCompleter.isInstanceOf[dotty.tools.dotc.core.ClassfileLoader]
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Can you test if the reverse logic works? I.e. instead of checking if sym.isCompleted, check if .infoOrCompleter is instance of DottyUnpickler. (I think that's the correct class.) It's better to blacklist loaders we know to misbehave, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea with blacklisting, will check that one tomorrow

@BarkingBad BarkingBad force-pushed the scaladoc/java-lookups branch from c7ae254 to a2e2a3d Compare April 15, 2021 09:01
@BarkingBad
Copy link
Contributor Author

Could you @abgruszecki take a look again, please?

Copy link
Contributor

@abgruszecki abgruszecki left a comment

Choose a reason for hiding this comment

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

LGTM!

@abgruszecki abgruszecki merged commit 1f503e7 into scala:master Apr 16, 2021
@Kordyjan Kordyjan added this to the 3.0.1 milestone Aug 2, 2023
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.

Doctool: lookup Java definitions
3 participants