Sha256: b2ab7b09e7b1ab3d4bc63ecd2dd2d892bbcb67bbf4c551b42a57b4af961eb788

Contents?: true

Size: 540 Bytes

Versions: 4

Compression:

Stored size: 540 Bytes

Contents

def foo(k:)
end

h = { k: 42 }
foo(**h)

def bar(int:, str:)
end

if rand < 0.5
  h = { int: 42 }
else
  h = { str: "str" }
end
bar(**h)

def baz(**kw)
end

if rand < 0.5
  h = { int: 42 }
else
  h = { str: "str" }
end
baz(**h)

def qux(**kw)
end

qux(**any)

__END__
# Errors
smoke/kwsplat1.rb:30: [error] undefined method: Object#any

# Classes
class Object
  def foo : (k: Integer) -> nil
  def bar : (int: Integer, str: String) -> nil
  def baz : (**{int: Integer, str: String}) -> nil
  def qux : (**Hash[untyped, untyped]) -> nil
end

Version data entries

4 entries across 4 versions & 1 rubygems

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