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

Unexpected error with forward argument #1086

Open
ksss opened this issue Mar 25, 2024 · 3 comments · May be fixed by #1382
Open

Unexpected error with forward argument #1086

ksss opened this issue Mar 25, 2024 · 3 comments · May be fixed by #1382
Labels

Comments

@ksss
Copy link
Contributor

ksss commented Mar 25, 2024

I found unexpected error pattern.

Repro

# sample.rbs
class Sample
end
# sample.rb
class Sample
  def foo(...)
    1.to_s(...)
  end
end
$ bundle exec steep check
$ bundle exec steep check
# Type checking files:

.....................................................................................[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)] Unexpected error: RuntimeError
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3786:in `type_check_args'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3919:in `block in try_method_type'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3912:in `try_method_type'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3571:in `block (3 levels) in type_method_call'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/typing.rb:234:in `new_child'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3559:in `block (2 levels) in type_method_call'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3558:in `block in type_method_call'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3557:in `each'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3557:in `type_method_call'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3192:in `type_send_interface'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3402:in `type_send'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:2653:in `block in synthesize_sendish'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   <internal:kernel>:148:in `yield_self'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:2642:in `synthesize_sendish'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:2598:in `block in synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:694:in `synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:2628:in `check'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:969:in `block (3 levels) in synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:280:in `block in with_method_constr'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:279:in `with_method_constr'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:943:in `block (2 levels) in synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   <internal:kernel>:148:in `yield_self'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:938:in `block in synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:694:in `synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:1505:in `block (3 levels) in synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:537:in `block in with_class_constr'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:536:in `with_class_constr'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:1495:in `block (2 levels) in synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   <internal:kernel>:148:in `yield_self'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:1457:in `block in synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:694:in `synthesize'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/services/type_check_service.rb:421:in `type_check'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/services/type_check_service.rb:356:in `block in type_check_file'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/services/type_check_service.rb:354:in `type_check_file'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/services/type_check_service.rb:310:in `block (2 levels) in typecheck_source'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep.rb:192:in `measure'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/services/type_check_service.rb:304:in `block in typecheck_source'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/services/type_check_service.rb:303:in `typecheck_source'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/server/type_check_worker.rb:205:in `handle_job'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/server/base_worker.rb:56:in `block (2 levels) in run'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.7.0.dev.3] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/server/base_worker.rb:46:in `block in run'
F

sample.rb:3:4: [error] UnexpectedError: (RuntimeError)
│ 1. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3786:in `type_check_args'
│ 2. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3919:in `block in try_method_type'
│ 3. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
│ 4. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3912:in `try_method_type'
│ 5. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3571:in `block (3 levels) in type_method_call'
│ 6. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/typing.rb:234:in `new_child'
│ 7. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3559:in `block (2 levels) in type_method_call'
│ 8. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `block in tagged'
│ 9. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:39:in `tagged'
│ 10. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/tagged_logging.rb:135:in `tagged'
│ 11. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3558:in `block in type_method_call'
│ 12. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3557:in `each'
│ 13. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3557:in `type_method_call'
│ 14. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3192:in `type_send_interface'
│ 15. /Users/yuki.kurihara/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/steep-1.7.0.dev.3/lib/steep/type_construction.rb:3402:in `type_send'
│   (50 more backtrace)
│
│ Diagnostic ID: Ruby::UnexpectedError
│
└     1.to_s(...)
      ~~~~~~~~~~~

Detected 1 problem from 1 file
@tk0miya
Copy link
Contributor

tk0miya commented Nov 29, 2024

It seems this was already fixed in 1.7.0. I can't find which PR fixed this, but 1.7.0 and the latest release does not cause any errors.

@ksss
Copy link
Contributor Author

ksss commented Nov 30, 2024

It still reproduces in my environment.

$ bundle exec steep version
1.9.0.dev.2

$ bundle exec rbs -v
rbs 3.7.0.dev.1

$ bundle exec steep check
# Type checking files:

2024-11-30 12:55:46.583: FATAL: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)] Unexpected error: RuntimeError
2024-11-30 12:55:46.583: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3784:in `type_check_args'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3924:in `block in try_method_type'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3916:in `try_method_type'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3569:in `block (3 levels) in type_method_call'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/typing.rb:292:in `new_child'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3557:in `block (2 levels) in type_method_call'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3556:in `block in type_method_call'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3555:in `each'
2024-11-30 12:55:46.584: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3555:in `type_method_call'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3187:in `type_send_interface'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3401:in `type_send'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:2660:in `synthesize_sendish'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:2616:in `block in synthesize'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:696:in `synthesize'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:2646:in `check'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:966:in `block (3 levels) in synthesize'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:280:in `block in with_method_constr'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:279:in `with_method_constr'
2024-11-30 12:55:46.585: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:940:in `block (2 levels) in synthesize'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   <internal:kernel>:148:in `yield_self'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:935:in `block in synthesize'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:696:in `synthesize'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:1508:in `block (3 levels) in synthesize'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:539:in `block in with_class_constr'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:538:in `with_class_constr'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:1498:in `block (2 levels) in synthesize'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   <internal:kernel>:148:in `yield_self'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:1460:in `block in synthesize'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
2024-11-30 12:55:46.586: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:696:in `synthesize'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/services/type_check_service.rb:350:in `type_check'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/services/type_check_service.rb:285:in `block in type_check_file'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/services/type_check_service.rb:283:in `type_check_file'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/services/type_check_service.rb:239:in `block (2 levels) in typecheck_source'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep.rb:208:in `measure'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/services/type_check_service.rb:233:in `block in typecheck_source'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/services/type_check_service.rb:232:in `typecheck_source'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/server/type_check_worker.rb:196:in `handle_job'
2024-11-30 12:55:46.587: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/server/base_worker.rb:56:in `block (2 levels) in run'
2024-11-30 12:55:46.588: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
2024-11-30 12:55:46.588: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
2024-11-30 12:55:46.588: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
2024-11-30 12:55:46.588: ERROR: [Steep 1.9.0.dev.2] [typecheck:typecheck@4] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(3:5)]   /Users/yuki.kurihara/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/server/base_worker.rb:46:in `block in run'
.F

sample.rb:3:4: [error] UnexpectedError: (RuntimeError)
│ 1. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3784:in `type_check_args'
│ 2. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3924:in `block in try_method_type'
│ 3. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
│ 4. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3916:in `try_method_type'
│ 5. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3569:in `block (3 levels) in type_method_call'
│ 6. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/typing.rb:292:in `new_child'
│ 7. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3557:in `block (2 levels) in type_method_call'
│ 8. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `block in tagged'
│ 9. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:38:in `tagged'
│ 10. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activesupport-8.0.0/lib/active_support/tagged_logging.rb:143:in `tagged'
│ 11. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3556:in `block in type_method_call'
│ 12. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3555:in `each'
│ 13. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3555:in `type_method_call'
│ 14. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3187:in `type_send_interface'
│ 15. /Users/ksss/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/steep-1.9.0.dev.2/lib/steep/type_construction.rb:3401:in `type_send'
│   (48 more backtrace)
│
│ Diagnostic ID: Ruby::UnexpectedError
│
└     1.to_s(...)
      ~~~~~~~~~~~

Detected 1 problem from 1 file

@tk0miya
Copy link
Contributor

tk0miya commented Nov 30, 2024

Ah, sorry. In my local, sample.rbs was modified by rbs-inline. I reproduced the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants