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.39.0 smoke/enumerator/b.rb
steep-0.38.0 smoke/enumerator/b.rb
steep-0.37.0 smoke/enumerator/b.rb
steep-0.36.0 smoke/enumerator/b.rb
steep-0.35.0 smoke/enumerator/b.rb
steep-0.34.0 smoke/enumerator/b.rb
steep-0.33.0 smoke/enumerator/b.rb
steep-0.32.0 smoke/enumerator/b.rb
steep-0.31.1 smoke/enumerator/b.rb
steep-0.31.0 smoke/enumerator/b.rb
steep-0.30.0 smoke/enumerator/b.rb
steep-0.29.0 smoke/enumerator/b.rb
steep-0.28.0 smoke/enumerator/b.rb
steep-0.27.0 smoke/enumerator/b.rb
steep-0.25.0 smoke/enumerator/b.rb
steep-0.24.0 smoke/enumerator/b.rb
steep-0.23.0 smoke/enumerator/b.rb
steep-0.22.0 smoke/enumerator/b.rb
steep-0.21.0 smoke/enumerator/b.rb
steep-0.20.0 smoke/enumerator/b.rb