Sha256: ea997b520e0d9924bfa853f8ab4d00593e9b8bbdfda498fe1d6e742a017947e8

Contents?: true

Size: 977 Bytes

Versions: 13

Compression:

Stored size: 977 Bytes

Contents

# @type var a: Integer

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

# @type var b: Integer

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

# @type var c: Integer

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

# @type var e: Integer

# !expects IncompatibleAssignment: lhs_type=::Integer, rhs_type=(::Array[::Integer] | ::Symbol | ::Integer)
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

13 entries across 13 versions & 1 rubygems

Version Path
steep-0.39.0 smoke/rescue/a.rb
steep-0.38.0 smoke/rescue/a.rb
steep-0.37.0 smoke/rescue/a.rb
steep-0.36.0 smoke/rescue/a.rb
steep-0.35.0 smoke/rescue/a.rb
steep-0.34.0 smoke/rescue/a.rb
steep-0.33.0 smoke/rescue/a.rb
steep-0.32.0 smoke/rescue/a.rb
steep-0.31.1 smoke/rescue/a.rb
steep-0.31.0 smoke/rescue/a.rb
steep-0.30.0 smoke/rescue/a.rb
steep-0.29.0 smoke/rescue/a.rb
steep-0.28.0 smoke/rescue/a.rb