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

Sorbet/AllowIncompatibleOverride inspection error #171

Closed
jakebrady5 opened this issue Aug 11, 2023 · 2 comments · Fixed by #173
Closed

Sorbet/AllowIncompatibleOverride inspection error #171

jakebrady5 opened this issue Aug 11, 2023 · 2 comments · Fixed by #173
Assignees

Comments

@jakebrady5
Copy link
Contributor

When parsing a signature resembling sig { override(allow_incompatible: true).void } the inspection errors as follows:

NoMethodError:
  undefined method `each_node' for nil:NilClass
# ./lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:39:in `sig?'
# ./lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:32:in `allow_incompatible_override?'
# ./lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb:41:in `on_send'

Test case added on this branch reproduces the error.

rspec ./spec/rubocop/cop/sorbet/signatures/allow_incompatible_override_spec.rb:17

Seems potentially related to a recent refactor?

@willvictoria
Copy link

+1, seeing this error when upgrading from 0.7.0 -> 0.7.2

@KaanOzkan
Copy link
Contributor

This should be fixed in v0.7.3 https://github.com/Shopify/rubocop-sorbet/releases/tag/v0.7.3

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 a pull request may close this issue.

3 participants