Skip to content

Fix NotImplementedError in SigTyProcNode for RBS proc types#335

Merged
mame merged 1 commit intoruby:masterfrom
sinsoku:fix-sig-ty-proc-node-not-implemented-error
Aug 12, 2025
Merged

Fix NotImplementedError in SigTyProcNode for RBS proc types#335
mame merged 1 commit intoruby:masterfrom
sinsoku:fix-sig-ty-proc-node-not-implemented-error

Conversation

@sinsoku
Copy link
Contributor

@sinsoku sinsoku commented Aug 9, 2025

Previously, using proc types in RBS files (e.g., ^() -> Integer) would raise NotImplementedError when TypeProf tried to process them through SigTyProcNode#covariant_vertex0.

This commit:

  • Adds initialize method to SigTyProcNode to properly parse RBS::Types::Proc
  • Implements covariant_vertex0 and contravariant_vertex0 methods
  • Wraps RBS::Types::Function in RBS::MethodType for compatibility
  • Adds comprehensive test scenarios for proc type handling

The implementation currently returns the base Proc type without detailed function signature information, which can be enhanced in the future.

🤖 Generated with Claude Code

Previously, using proc types in RBS files (e.g., ^() -> Integer) would
raise NotImplementedError when TypeProf tried to process them through
SigTyProcNode#covariant_vertex0.

This commit:
- Adds initialize method to SigTyProcNode to properly parse RBS::Types::Proc
- Implements covariant_vertex0 and contravariant_vertex0 methods
- Wraps RBS::Types::Function in RBS::MethodType for compatibility
- Adds comprehensive test scenarios for proc type handling

The implementation currently returns the base Proc type without detailed
function signature information, which can be enhanced in the future.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@mame mame merged commit 56ea0ce into ruby:master Aug 12, 2025
7 checks passed
@mame
Copy link
Member

mame commented Aug 12, 2025

This change looks need more work, but is definitely better than NotImplementedError. Thanks!

@sinsoku sinsoku deleted the fix-sig-ty-proc-node-not-implemented-error branch November 1, 2025 07:37
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.

2 participants