Sha256: c2e7ad25dd5bcc3f68a3188e28f01c0b58f49df8ec04e5ad6f1ad35bf164fae3

Contents?: true

Size: 321 Bytes

Versions: 4

Compression:

Stored size: 321 Bytes

Contents

def foo
  { int: 1, str: "str" }
end

foo

def bar
  # This returns {Integer=>Integer | String, String=>String} but RBS cannot express it
  { 1 => 1, 2 => "str", "s" => "s" }
end

bar

__END__
# Classes
class Object
  def foo : -> {int: Integer, str: String}
  def bar : -> (Hash[Integer | String, Integer | String])
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
typeprof-0.7.0 smoke/hash1.rb
typeprof-0.6.1 smoke/hash1.rb
typeprof-0.6.0 smoke/hash1.rb
typeprof-0.5.4 smoke/hash1.rb