Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix InvalidOverloadMethodError on overloading extended method #1294

Conversation

pocke
Copy link
Member

@pocke pocke commented Apr 3, 2023

Fix #1293

This PR fixes InvalidOverloadMethodError when a class has an overloading singleton method for an extended method.

#1268 introduced this problem. It added an import_methods call before defining methods of extended modules, but import_methods depends on it. So the import_methods cannot find methods defined by extended modules.

This PR moves import_methods after define_instance for extended modules, and removes duplicated import_methods because it was called twice since #1294.

@pocke pocke marked this pull request as ready for review April 3, 2023 16:12
@pocke pocke force-pushed the Fix_InvalidOverloadMethodError_on_overloading_extended_method branch from 76f3e59 to ccdcb47 Compare April 4, 2023 04:11
Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@soutaro soutaro added this to the RBS 3.0.x milestone Apr 10, 2023
@pocke pocke added this pull request to the merge queue Apr 10, 2023
Merged via the queue into ruby:master with commit ff85396 Apr 10, 2023
@pocke pocke deleted the Fix_InvalidOverloadMethodError_on_overloading_extended_method branch April 10, 2023 15:21
@soutaro soutaro modified the milestones: RBS 3.0.x, RBS 3.1 Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

RBS::InvalidOverloadMethodError caused when the super method is defined by an extended module
2 participants