Skip to content

bugfix: Check if symbol exists before calling methods on it #23376

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

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

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Jun 16, 2025

Fixes #23374

@tgodzik tgodzik requested a review from natsukagami June 16, 2025 08:32
Copy link
Contributor

@natsukagami natsukagami left a comment

Choose a reason for hiding this comment

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

Just one comment, otherwise lgtm!

@@ -320,27 +320,27 @@ object ExtractSemanticDB:
registerDefinition(tree.symbol, selectSpan(tree), Set.empty, tree.source)
case tree => registerDefinition(tree.symbol, tree.span, Set.empty, tree.source)
case tree: NamedDefTree =>
if !tree.symbol.isAllOf(ModuleValCreationFlags) then
if tree.symbol.exists && !tree.symbol.isAllOf(ModuleValCreationFlags) then
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need both this check and one in every branch of the match? It feels a bit redundant to me

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.

### java.lang.AssertionError: NoDenotation.owner occurred in the presentation compiler.
2 participants