Sha256: fde6789261df65b8261463d422c81c3506174049268aa6a297c70c0eafcc6e0f

Contents?: true

Size: 527 Bytes

Versions: 32

Compression:

Stored size: 527 Bytes

Contents

# @type var b: Array[String]
# @type var c: Array[Integer]

a = [1]

# !expects* UnresolvedOverloading:
b = a.each.with_object([]) do |i, xs|
  # @type var xs: String
  xs << i.to_s
end

# !expects IncompatibleAssignment: lhs_type=::Array[::Integer], rhs_type=::Array[::String]
c = a.each.with_object([]) do |i, xs|
  # @type var xs: Array[String]
  xs << i.to_s
end

# @type var d: String
# !expects IncompatibleAssignment: lhs_type=::String, rhs_type=::Array[untyped]
d = a.each.with_object([]) do |i, xs|
  xs << i.to_s
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
steep-0.19.0 smoke/enumerator/b.rb
steep-0.18.0 smoke/enumerator/b.rb
steep-0.17.1 smoke/enumerator/b.rb
steep-0.17.0 smoke/enumerator/b.rb
steep-0.16.3 smoke/enumerator/b.rb
steep-0.16.2 smoke/enumerator/b.rb
steep-0.16.1 smoke/enumerator/b.rb
steep-0.16.0 smoke/enumerator/b.rb
steep-0.15.0 smoke/enumerator/b.rb
steep-0.14.0 smoke/enumerator/b.rb
steep-0.13.0 smoke/enumerator/b.rb
steep-0.12.0 smoke/enumerator/b.rb