fix(scala): emit heritage edges for qualified extends/with clauses - #1794
Open
Synvoya wants to merge 1 commit into
Open
fix(scala): emit heritage edges for qualified extends/with clauses#1794Synvoya wants to merge 1 commit into
Synvoya wants to merge 1 commit into
Conversation
Synvoya
force-pushed
the
fix/scala-qualified-extends
branch
from
July 27, 2026 02:41
b80ef97 to
7fd68d9
Compare
Contributor
Author
|
Follow-up audit against current v8 found that qualified generic parents such as pkg.Base[Int] still retained the package prefix through the generic_type path. The branch now normalizes both plain and generic qualified parents to the tail type name and extends the regression test. Current validation: tests/test_languages.py 319 passed, 13 skipped; Ruff and git diff --check passed. |
Synvoya
force-pushed
the
fix/scala-qualified-extends
branch
from
July 27, 2026 04:15
7fd68d9 to
8949e4f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Scala qualified parents were either dropped or retained as package-qualified labels. For example,
class Foo extends pkg.Base with other.Traitshould emitFoo -> BaseandFoo -> Trait.Root cause
The heritage walker handled
type_identifierand a narrowgeneric_typeshape. Qualified parents parse asstable_type_identifier; qualified generic parents wrap that node insidegeneric_type.Fix
Normalize heritage nodes through one bounded helper:
type_identifierreturns its name;stable_type_identifierreturns its final type segment;generic_typerecursively normalizes its base type.Only direct heritage children are considered, so package segments, generic arguments and constructor arguments cannot become parent edges. The first parent remains
inherits; subsequentwithparents remainmixes_in.Validation
tests/test_languages.py: 319 passed, 13 optional-DM skips.git diff --check: passed.