Repository navigation
Resolve module-qualified inherited types - #362
Merged
sidepelican merged 2 commits intoNov 4, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sidepelican
approved these changes
Nov 4, 2026
sidepelican
left a comment
Contributor
There was a problem hiding this comment.
Thank you for the fix.
mockolo’s current lookup logic does not support qualified names, so this change alone will not address every case, and I expect some edge cases will remain.
That said, given the existing limitations, I think this is a practical improvement and would like to accept it as an incremental step.
Co-authored-by: Iceman <side.junktown@gmail.com>
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.
The generated
AccountServiceMockhad nosignOut(), even when the parent's source was scanned, so it failed to conform.The inheritance parser now uses the last component of a qualified type name for lookup, matching the existing protocol map.
The lookup also skips names already on the current inheritance path. This prevents self-recursion that resolving qualified names would otherwise introduce for declarations such as
protocol P: OtherModule.P.Tests:
testModuleQualifiedInheritance: a compiled fixture checks that the mock includes both inherited and local methods.testModuleQualifiedInheritanceWithSameName: checks thatprotocol P: OtherModule.Ppreserves the previous generated output without recursing.🤖 Generated with Claude Code