-
Notifications
You must be signed in to change notification settings - Fork 93
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
base: master
Are you sure you want to change the base?
Stop MethodDefinitionMissing for attr_* and aliases #976
Conversation
|
||
typing.errors[0].tap do |error| | ||
assert_instance_of Diagnostic::Ruby::NoMethod, error | ||
assert_equal :attr_writer, error.method # why? |
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also.
case method_name | ||
when :attr_reader | ||
arguments.each do |arg| | ||
module_context.defined_instance_methods << arg.children[0] |
There was a problem hiding this comment.
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.
No description provided.