Sha256: acae995437dbc8a3356331580d41a159731591f5b8d1ce72d0e975259a6141b1

Contents?: true

Size: 1.1 KB

Versions: 16

Compression:

Stored size: 1.1 KB

Contents

# @type var a: Integer

# !expects IncompatibleAssignment: lhs_type=::Integer, rhs_type=(::Integer | ::String)
a = begin
      'foo'
    rescue
      1
    end

# @type var b: Integer

# !expects IncompatibleAssignment: lhs_type=::Integer, rhs_type=(::Integer | ::String)
b = 'foo' rescue 1

# @type var c: Integer

# !expects IncompatibleAssignment: lhs_type=::Integer, rhs_type=(::Integer | ::String | ::Symbol)
c = begin
      'foo'
    rescue RuntimeError
      :sym
    rescue StandardError
      1
    end

# @type var d: Integer

# !expects IncompatibleAssignment: lhs_type=::Integer, rhs_type=::String
d = begin
      1
    else
      'foo'
    end

# @type var e: Integer

# !expects IncompatibleAssignment: lhs_type=::Integer, rhs_type=(::Array[::Integer] | ::Integer | ::Symbol)
e = begin
      'foo'
    rescue RuntimeError
      :sym
    rescue StandardError
      1
    else
      [1]
    end

# @type method foo: (String) -> String

# !expects MethodBodyTypeMismatch: method=foo, expected=::String, actual=(::Integer | ::String)
def foo(a)
  10
rescue
  'foo'
end

# when empty
begin
rescue
else
ensure
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
steep-0.27.0 smoke/rescue/a.rb
steep-0.25.0 smoke/rescue/a.rb
steep-0.24.0 smoke/rescue/a.rb
steep-0.23.0 smoke/rescue/a.rb
steep-0.22.0 smoke/rescue/a.rb
steep-0.21.0 smoke/rescue/a.rb
steep-0.20.0 smoke/rescue/a.rb
steep-0.19.0 smoke/rescue/a.rb
steep-0.18.0 smoke/rescue/a.rb
steep-0.17.1 smoke/rescue/a.rb
steep-0.17.0 smoke/rescue/a.rb
steep-0.16.3 smoke/rescue/a.rb
steep-0.16.2 smoke/rescue/a.rb
steep-0.16.1 smoke/rescue/a.rb
steep-0.16.0 smoke/rescue/a.rb
steep-0.15.0 smoke/rescue/a.rb