steep
steep copied to clipboard
UnexpectedError: Unexpected self_type: untyped(RuntimeError)
The following code causes steep to raise an UnexpectedError.
::Data.define(:foo) do
def self.bar
end
end
steep check log
# Type checking files:
........................................................................................................................................................................................................................................................[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] Unexpected error: #<RuntimeError: Unexpected self_type: untyped>
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:256:in `for_new_method'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:1057:in `block (2 levels) in synthesize'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] <internal:kernel>:90:in `tap'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:1044:in `block in synthesize'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:694:in `synthesize'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:4517:in `synthesize_block'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:4057:in `block in try_method_type'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3930:in `try_method_type'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3589:in `block (3 levels) in type_method_call'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/typing.rb:234:in `new_child'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3577:in `block (2 levels) in type_method_call'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3576:in `block in type_method_call'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3575:in `each'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3575:in `type_method_call'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3210:in `type_send_interface'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3420:in `type_send'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:2700:in `block in synthesize_sendish'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] <internal:kernel>:148:in `yield_self'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:2694:in `synthesize_sendish'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:2616:in `block in synthesize'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:694:in `synthesize'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/services/type_check_service.rb:421:in `type_check'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/services/type_check_service.rb:356:in `block in type_check_file'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/services/type_check_service.rb:354:in `type_check_file'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/services/type_check_service.rb:310:in `block (2 levels) in typecheck_source'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep.rb:192:in `measure'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/services/type_check_service.rb:304:in `block in typecheck_source'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/services/type_check_service.rb:303:in `typecheck_source'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/server/type_check_worker.rb:205:in `handle_job'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/server/base_worker.rb:56:in `block (2 levels) in run'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `block in tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:39:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `tagged'
[Steep 1.8.0.dev.1] [typecheck:typecheck@11] [background] [#typecheck_source(path=sample.rb)] [#type_check_file(sample.rb@sample)] [synthesize:(1:1)] [[KLASS < ::Data::_DataClass] (*::Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS] [synthesize:(2:3)] /Users/ksss/src/github.com/ksss/steep/lib/steep/server/base_worker.rb:46:in `block in run'
F..................
sample.rb:2:2: [error] UnexpectedError: Unexpected self_type: untyped(RuntimeError)
│ 1. /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:256:in `for_new_method'
│ 2. /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:1057:in `block (2 levels) in synthesize'
│ 3. <internal:kernel>:90:in `tap'
│ 4. /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:1044:in `block in synthesize'
│ 5. /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `block in tagged'
│ 6. /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:39:in `tagged'
│ 7. /Users/ksss/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/tagged_logging.rb:135:in `tagged'
│ 8. /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:694:in `synthesize'
│ 9. /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:4517:in `synthesize_block'
│ 10. /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:4057:in `block in try_method_type'
│ 11. /Users/ksss/src/github.com/ksss/steep/lib/steep/subtyping/check.rb:53:in `push_variable_bounds'
│ 12. /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3930:in `try_method_type'
│ 13. /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3589:in `block (3 levels) in type_method_call'
│ 14. /Users/ksss/src/github.com/ksss/steep/lib/steep/typing.rb:234:in `new_child'
│ 15. /Users/ksss/src/github.com/ksss/steep/lib/steep/type_construction.rb:3577:in `block (2 levels) in type_method_call'
│ (35 more backtrace)
│
│ Diagnostic ID: Ruby::UnexpectedError
│
└ def self.bar
~~~~~~~~~~~~
Detected 1 problem from 1 file
The RBS for Data.define is as follows.
def self.define: [KLASS < _DataClass] (*Symbol) ?{ (KLASS) [self: KLASS] -> void } -> KLASS
https://github.com/ruby/rbs/blob/3307ffd4f82620c71af0a96566930a81128c6251/core/data.rbs#L109C3-L109C94