Sha256: 2ab6241b6d163e4ddc5af9737a6aeee3e8bc217ac5072095434b470cf36fb195

Contents?: true

Size: 318 Bytes

Versions: 14

Compression:

Stored size: 318 Bytes

Contents

def foo
  if rand < 0.5
    unknown
  else
    [:a, [:b, :c]]
  end
end

a, *bc = foo

p(a)

__END__
# Errors
smoke/expandarray2.rb:3: [error] undefined method: Object#unknown

# Revealed types
#  smoke/expandarray2.rb:11 #=> :a | untyped

# Classes
class Object
  private
  def foo: -> ([:a, [:b, :c]] | untyped)
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
typeprof-0.20.0 smoke/expandarray2.rb
typeprof-0.15.3 smoke/expandarray2.rb
typeprof-0.15.2 smoke/expandarray2.rb
typeprof-0.15.1 smoke/expandarray2.rb
typeprof-0.15.0 smoke/expandarray2.rb
typeprof-0.14.1 smoke/expandarray2.rb
typeprof-0.14.0 smoke/expandarray2.rb
typeprof-0.13.0 smoke/expandarray2.rb
typeprof-0.12.0 smoke/expandarray2.rb
typeprof-0.11.0 smoke/expandarray2.rb
typeprof-0.10.0 smoke/expandarray2.rb
typeprof-0.9.2 smoke/expandarray2.rb
typeprof-0.9.1 smoke/expandarray2.rb
typeprof-0.9.0 smoke/expandarray2.rb