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

Stop MethodDefinitionMissing for attr_* and aliases #976

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tk0miya
Copy link
Contributor

@tk0miya tk0miya commented Dec 6, 2023

No description provided.


typing.errors[0].tap do |error|
assert_instance_of Diagnostic::Ruby::NoMethod, error
assert_equal :attr_writer, error.method # why?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure why NoMethod is raised for attr_writer...


typing.errors[0].tap do |error|
assert_instance_of Diagnostic::Ruby::NoMethod, error
assert_equal :attr_accessor, error.method # why?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is also.

@soutaro soutaro added this to the Steep 1.7 milestone Dec 25, 2023
case method_name
when :attr_reader
arguments.each do |arg|
module_context.defined_instance_methods << arg.children[0]
Copy link
Owner

Choose a reason for hiding this comment

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

Looks like it's assuming the arguments are symbol literals? Should consider the case they are not.

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.

None yet

2 participants