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

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ 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
tree match {
case tree: ValDef if tree.symbol.isAllOf(EnumValue) =>
tree.rhs match
Expand Down Expand Up @@ -379,7 +379,7 @@ object ExtractSemanticDB:
traverseAnnotsOfDefinition(ctorSym)
ctorParams(tree.constr.termParamss, tree.constr.leadingTypeParams, tree.body)
registerDefinition(ctorSym, tree.constr.nameSpan.startPos, Set.empty, tree.source)
case tree: Apply =>
case tree: Apply if tree.fun.symbol.exists =>
@tu lazy val genParamSymbol: Name => String = tree.fun.symbol.funParamSymbol
traverse(tree.fun)
synth.tryFindSynthetic(tree).foreach(synthetics.addOne)
Expand Down
Loading