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

“NoMethodError: undefined method `line' for nil” on ….() do #:… end #1395

Open
ParadoxV5 opened this issue Dec 9, 2024 · 0 comments · May be fixed by #1433
Open

“NoMethodError: undefined method `line' for nil” on ….() do #:… end #1395

ParadoxV5 opened this issue Dec 9, 2024 · 0 comments · May be fixed by #1433

Comments

@ParadoxV5
Copy link
Contributor

$ cat ruby.rb; steep check
proc{yield}.() do
  #: nil
end
# Type checking files:

2024-12-08 18:03:29.947: FATAL: [Steep 1.9.0] [typecheck:typecheck@3] [background] Unexpected error: #<NoMethodError: undefined method `line' for nil>
2024-12-08 18:03:29.947: ERROR: [Steep 1.9.0] [typecheck:typecheck@3] [background]   /usr/local/lib/ruby/gems/3.3.0/gems/steep-1.9.0/lib/steep/source.rb:640:in `sendish_node?'
2024-12-08 18:03:29.947: ERROR: [Steep 1.9.0] [typecheck:typecheck@3] [background]   /usr/local/lib/ruby/gems/3.3.0/gems/steep-1.9.0/lib/steep/source.rb:527:in `insert_type_node'
2024-12-08 18:03:29.947: ERROR: [Steep 1.9.0] [typecheck:typecheck@3] [background]   /usr/local/lib/ruby/gems/3.3.0/gems/steep-1.9.0/lib/steep/source.rb:85:in `parse'
2024-12-08 18:03:29.947: ERROR: [Steep 1.9.0] [typecheck:typecheck@3] [background]   /usr/local/lib/ruby/gems/3.3.0/gems/steep-1.9.0/lib/steep/services/type_check_service.rb:284:in `block in type_check_file'
tk0miya added a commit to tk0miya/steep that referenced this issue Dec 19, 2024
`Steep::Source.parse` crashes if the target code contains
selector-less sendish node having annotation comment inside its
block.

Close soutaro#1395
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.

1 participant