Sha256: 3d0d8de0ec82890ad7637607a4a3b7c4a9e6aefbe4f0f42373fea228f44e861d

Contents?: true

Size: 545 Bytes

Versions: 11

Compression:

Stored size: 545 Bytes

Contents

# @type var x: Integer | String | Symbol

x = (_ = nil)

case x
when Integer, String
  # !expects NoMethodError: type=(::Integer | ::String), method=foobar
  x.foobar()
end

case x == (_ = 1)
when Integer
  # !expects NoMethodError: type=(::Integer | ::String | ::Symbol), method=foobar
  x.foobar
end

case x
when 1
  # !expects NoMethodError: type=(::Integer | ::String | ::Symbol), method=foobar
  x.foobar
end

case x
when String
  # !expects@+2 IncompatibleAnnotation: var_name=x, ::Integer <: ::String
  # @type var x: Integer
  x + 1
end

Version data entries

11 entries across 11 versions & 1 rubygems

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