Sha256: 85a78da3efd588d2dcd11c26d0a7e953c59019feb682ec8279d156726980b159

Contents?: true

Size: 727 Bytes

Versions: 16

Compression:

Stored size: 727 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

case x
when Object
  # !expects@+2 IncompatibleTypeCase: var_name=x, ::Object <: (::Integer | ::String | ::Symbol)
  # !expects NoMethodError: type=::Object, method=foobar
  x.foobar
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
steep-0.11.1 smoke/type_case/a.rb
steep-0.11.0 smoke/type_case/a.rb
steep-0.10.0 smoke/type_case/a.rb
steep-0.9.0 smoke/type_case/a.rb
steep-0.8.2 smoke/type_case/a.rb
steep-0.8.1 smoke/type_case/a.rb
steep-0.8.0 smoke/type_case/a.rb
steep-0.7.1 smoke/type_case/a.rb
steep-0.7.0 smoke/type_case/a.rb
steep-0.6.0 smoke/type_case/a.rb
steep-0.5.1 smoke/type_case/a.rb
steep-0.5.0 smoke/type_case/a.rb
steep-0.4.0 smoke/type_case/a.rb
steep-0.3.0 smoke/type_case/a.rb
steep-0.2.0 smoke/type_case/a.rb
steep-0.1.0 smoke/type_case/a.rb