Sha256: c0a00acf62f246eb9a66c7a48362349e8c27cacad3feb936a3802f755b93b482

Contents?: true

Size: 320 Bytes

Versions: 14

Compression:

Stored size: 320 Bytes

Contents

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

a, (b, c) = foo

p(a)
__END__
# Errors
smoke/expandarray1.rb:3: [error] undefined method: Object#unknown

# Revealed types
#  smoke/expandarray1.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/expandarray1.rb
typeprof-0.15.3 smoke/expandarray1.rb
typeprof-0.15.2 smoke/expandarray1.rb
typeprof-0.15.1 smoke/expandarray1.rb
typeprof-0.15.0 smoke/expandarray1.rb
typeprof-0.14.1 smoke/expandarray1.rb
typeprof-0.14.0 smoke/expandarray1.rb
typeprof-0.13.0 smoke/expandarray1.rb
typeprof-0.12.0 smoke/expandarray1.rb
typeprof-0.11.0 smoke/expandarray1.rb
typeprof-0.10.0 smoke/expandarray1.rb
typeprof-0.9.2 smoke/expandarray1.rb
typeprof-0.9.1 smoke/expandarray1.rb
typeprof-0.9.0 smoke/expandarray1.rb