Linearize ancestors for implicitly created namespaces - #1005
Open
HoneyryderChuck wants to merge 1 commit into
Open
Linearize ancestors for implicitly created namespaces#1005HoneyryderChuck wants to merge 1 commit into
HoneyryderChuck wants to merge 1 commit into
Conversation
A namespace implied only by compact definitions (`class A::B::C`, with no `module A::B` anywhere) gets a `TodoDeclaration` from `create_todo_for_parent`, which was the one namespace-creating path that never enqueued a `Unit::Ancestors` for it. Its chain stayed at the `Ancestors::Partial([])` default, and since a namespace's own id is pushed onto that chain by `linearize_ancestors`, `find_member_in_ancestors` had nothing to walk: every member lookup returned `MemberNotFound` even though the member table was fully populated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
|
CLA signed, but can't rerun it. |
st0012
reviewed
Aug 14, 2026
| } | ||
|
|
||
| #[test] | ||
| fn find_member_in_ancestors_returns_member_of_implicit_namespace() { |
Member
There was a problem hiding this comment.
I don't think this test is needed. It's basically testing resolution behaviour in query tests.
| end | ||
| end | ||
|
|
||
| def test_find_member_returns_members_of_implicit_namespaces |
Member
There was a problem hiding this comment.
We should test this in the test in resolution_tests, and delete this one
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.
A namespace implied only by compact definitions (
class A::B::C, with nomodule A::Banywhere) gets aTodoDeclarationfromcreate_todo_for_parent, which was the one namespace-creating path that never enqueued aUnit::Ancestorsfor it. Its chain stayed at theAncestors::Partial([])default, and since a namespace's own id is pushed onto that chain bylinearize_ancestors,find_member_in_ancestorshad nothing to walk: every member lookup returnedMemberNotFoundeven though the member table was fully populated.