Skip to content

Improve nested names handling even in #if scopes#823

Merged
ktoso merged 1 commit into
swiftlang:mainfrom
ktoso:wip-nest-same-name
Jul 9, 2026
Merged

Improve nested names handling even in #if scopes#823
ktoso merged 1 commit into
swiftlang:mainfrom
ktoso:wip-nest-same-name

Conversation

@ktoso

@ktoso ktoso commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

This also resolves #822 while at it

@ktoso ktoso force-pushed the wip-nest-same-name branch from 3a7632f to 2f72c00 Compare July 9, 2026 14:09
llsc12 added a commit to llsc12/swift-java that referenced this pull request Jul 9, 2026
Cherry-picked from swiftlang#823 (ktoso). Nested type/typealias
members wrapped in an #if/#else were never visited when building the
per-parent nested-type map, since the member-walk only checked for a direct
nominal or typealias decl and skipped IfConfigDeclSyntax entirely - so such
a type was invisible to lookups needing its parent, same class of symptom
as the extension-declared case fixed in cf5bd53, but a genuinely separate
gap (verified empirically: this PR alone, without cf5bd53, does not fix the
original extension-based repro - the two fixes are complementary, not
overlapping).
@ktoso ktoso force-pushed the wip-nest-same-name branch from 2f72c00 to 0204f00 Compare July 9, 2026 22:00
@ktoso

ktoso commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

Also handling the extension case better now, thanks @llsc12!

@ktoso ktoso merged commit 1822cf3 into swiftlang:main Jul 9, 2026
42 checks passed
@ktoso ktoso deleted the wip-nest-same-name branch July 9, 2026 22:32
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.

jextract issues with nested types that share the same name

1 participant