Error
wagenet opened this issue · 0 comments
wagenet commented
Please feel free to rename this issue to something more appropriate.
The following code causes an error when run through typeprof.
[].each_with_object({}) do |(key, value), acc|
acc[key] =
case value
when Array
:array
else
:other
end
end
/Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/iseq.rb:824:in `check_send_branch': Unknown insn: #<struct TypeProf::ISeq::Insn insn=:getlocal_checkmatch_branch, operands=[[3, 0], [:if, 19]], lineno=nil, code_range=nil, definitions=nil> (RuntimeError)
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/iseq.rb:573:in `block in unify_instructions'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/iseq.rb:567:in `times'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/iseq.rb:567:in `unify_instructions'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/iseq.rb:57:in `block in compile_core'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/iseq.rb:56:in `each'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/iseq.rb:56:in `compile_core'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/iseq.rb:19:in `compile'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/analyzer.rb:1020:in `type_profile'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/lib/typeprof/config.rb:123:in `analyze'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/gems/typeprof-0.20.4/exe/typeprof:9:in `<top (required)>'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/bin/typeprof:23:in `load'
from /Users/peterwagenet/.rvm/gems/ruby-3.0.1/bin/typeprof:23:in `<main>'