We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Passing multiple args through Symbol#to_proc is not supported yet
# sample.rbs class Sample end
# sample.rb class Sample def ng merged1 = [{ a: 1 }, { b: 2 }].reduce(&:merge) p merged1 # => {:a=>1, :b=>2} end def ok merged2 = [{ a: 1 }, { b: 2 }].reduce { |acc, hash| acc.merge(hash) } p merged2 # => {:a=>1, :b=>2} end end Sample.new.ng Sample.new.ok
$ ruby lib/sample.rb {:a=>1, :b=>2} {:a=>1, :b=>2}
$ bundle exec steep check # Type checking files: ...............................................................................2024-10-24 13:18:15.548: ERROR: [Steep 1.8.1] [typecheck:typecheck@0] [background] [#typecheck_source(path=lib/sample.rb)] [#type_check_file(lib/sample.rb@lib)] [synthesize:(1:1)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(2:3)] [synthesize:(3:5)] [synthesize:(3:5)] [synthesize:(3:14)] [[A] (A) { (A, ::Hash[::Symbol, ::Integer]) -> A } -> A] [synthesize:(3:42)] Passing multiple args through Symbol#to_proc is not supported yet 2024-10-24 13:18:15.550: ERROR: [Steep 1.8.1] [typecheck:typecheck@0] [background] [#typecheck_source(path=lib/sample.rb)] [#type_check_file(lib/sample.rb@lib)] [synthesize:(1:1)] [synthesize:(1:1)] [synthesize:(2:3)] [synthesize:(2:3)] [synthesize:(3:5)] [synthesize:(3:5)] [synthesize:(3:14)] [() { (::Hash[::Symbol, ::Integer], ::Hash[::Symbol, ::Integer]) -> ::Hash[::Symbol, ::Integer] } -> ::Hash[::Symbol, ::Integer]] [synthesize:(3:42)] Passing multiple args through Symbol#to_proc is not supported yet ...... No type error detected. 🫖
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Repro
Passing multiple args through Symbol#to_proc is not supported yet
$ bundle exec steep check
The text was updated successfully, but these errors were encountered: