Inspectopedia Help

Mismatched argument type

Reports method and yield calls with arguments whose inferred types don't match the parameter's expected type. The expected parameter type is taken from either of:

  • The RBS type signature

  • The Sorbet type signature

  • The YARD @param tag

Example:

# @param [Integer] param def method(param) end method([1, 2])

Inspection options

Option

Type

Default

Check nilability

Checkbox

true

Inspection Details

Available in:

Qodana for Ruby 2023.3, RubyMine 2023.3

Plugin:

Ruby, 233.SNAPSHOT

Last modified: 13 July 2023