Sha256: ed4de73fea2798ac1a4b78b81f5c65083e17e6d6d0bbc26d116b94e74fba0e68

Contents?: true

Size: 1.11 KB

Versions: 16

Compression:

Stored size: 1.11 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 | ::String | ::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.11.1 smoke/rescue/a.rb
steep-0.11.0 smoke/rescue/a.rb
steep-0.10.0 smoke/rescue/a.rb
steep-0.9.0 smoke/rescue/a.rb
steep-0.8.2 smoke/rescue/a.rb
steep-0.8.1 smoke/rescue/a.rb
steep-0.8.0 smoke/rescue/a.rb
steep-0.7.1 smoke/rescue/a.rb
steep-0.7.0 smoke/rescue/a.rb
steep-0.6.0 smoke/rescue/a.rb
steep-0.5.1 smoke/rescue/a.rb
steep-0.5.0 smoke/rescue/a.rb
steep-0.4.0 smoke/rescue/a.rb
steep-0.3.0 smoke/rescue/a.rb
steep-0.2.0 smoke/rescue/a.rb
steep-0.1.0 smoke/rescue/a.rb