Sha256: 44dfbc7fd1280b25d4a23ce5221e40d2808c27da3ad8e1de6a826122b263a77d

Contents?: true

Size: 538 Bytes

Versions: 10

Compression:

Stored size: 538 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 : (**{untyped=>untyped}) -> nil
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
typeprof-0.4.2 smoke/kwsplat1.rb
typeprof-0.4.1 smoke/kwsplat1.rb
typeprof-0.4.0 smoke/kwsplat1.rb
typeprof-0.3.0 smoke/kwsplat1.rb
typeprof-0.2.0 smoke/kwsplat1.rb
typeprof-0.1.4 smoke/kwsplat1.rb
typeprof-0.1.3 smoke/kwsplat1.rb
typeprof-0.1.2 smoke/kwsplat1.rb
typeprof-0.1.1 smoke/kwsplat1.rb
typeprof-0.1.0 smoke/kwsplat1.rb