You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement RBS prepend support with comprehensive tests
This commit adds full support for RBS::AST::Members::Prepend to properly handle
prepended modules in type checking and method resolution.
Key changes:
- Add SigPrependNode class to handle prepend declarations
- Separate prepended_modules from included_modules in ModuleEntity
- Fix method resolution order: prepended modules → class → included modules
- Update type compatibility checking to recognize prepended modules
- Fix prepend module ordering (last prepended = first in ancestor chain)
- Add break after finding first matching prepended method
Testing:
- Add test for basic prepend functionality
- Add test for multiple prepended modules
- Add test for prepend and include combination
This ensures that when a class prepends a module, instances of that class
are correctly recognized as compatible with the module type, and methods
from prepended modules properly override class methods following Ruby semantics.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments