Skip to content

fix: Prefer nested type resolution over global fallback#2288

Merged
dcodeIO merged 1 commit into
masterfrom
patch/nested-resolve
May 29, 2026
Merged

fix: Prefer nested type resolution over global fallback#2288
dcodeIO merged 1 commit into
masterfrom
patch/nested-resolve

Conversation

@dcodeIO

@dcodeIO dcodeIO commented May 26, 2026

Copy link
Copy Markdown
Member

Fixes relative type lookup when a nested type has the same name as a global type.

Previously, Namespace.lookup checked the root fully-qualified object cache before resolving relative to the current namespace, so an unqualified field type like NestedMessage inside TestMessage could incorrectly resolve to .NestedMessage instead of .TestMessage.NestedMessage. This now checks the relative scope first.

Fixes #2077

@dcodeIO dcodeIO requested a review from alexander-fenster May 26, 2026 15:48
@dcodeIO dcodeIO merged commit 4b4c703 into master May 29, 2026
5 checks passed
@github-actions github-actions Bot mentioned this pull request May 29, 2026
@dcodeIO dcodeIO deleted the patch/nested-resolve branch May 30, 2026 22:28
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.

Regresson since 7.5.2 - global message declaration has priority over nested message declaration

2 participants