Sha256: 3198010b80fa43ddee956cff0e5229d786c7b002ccf4a889030867d7cd017cdd

Contents?: true

Size: 311 Bytes

Versions: 18

Compression:

Stored size: 311 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
  def foo : -> ([:a, [:b, :c]] | untyped)
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
typeprof-0.7.0 smoke/expandarray1.rb
typeprof-0.6.1 smoke/expandarray1.rb
typeprof-0.6.0 smoke/expandarray1.rb
typeprof-0.5.4 smoke/expandarray1.rb
typeprof-0.5.3 smoke/expandarray1.rb
typeprof-0.5.2 smoke/expandarray1.rb
typeprof-0.5.1 smoke/expandarray1.rb
typeprof-0.5.0 smoke/expandarray1.rb
typeprof-0.4.2 smoke/expandarray1.rb
typeprof-0.4.1 smoke/expandarray1.rb
typeprof-0.4.0 smoke/expandarray1.rb
typeprof-0.3.0 smoke/expandarray1.rb
typeprof-0.2.0 smoke/expandarray1.rb
typeprof-0.1.4 smoke/expandarray1.rb
typeprof-0.1.3 smoke/expandarray1.rb
typeprof-0.1.2 smoke/expandarray1.rb
typeprof-0.1.1 smoke/expandarray1.rb
typeprof-0.1.0 smoke/expandarray1.rb