Sha256: 9bfabfc83b31edaffd2d1ff3eac80718f613674b0d8326eba9c1fff89a88b218

Contents?: true

Size: 525 Bytes

Versions: 16

Compression:

Stored size: 525 Bytes

Contents

# @type var b: Array<String>
# @type var c: Array<Integer>

a = [1]

# !expects* UnsatisfiableConstraint:
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<any>
d = a.each.with_object([]) do |i, xs|
  xs << i.to_s
end

Version data entries

16 entries across 16 versions & 1 rubygems

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