Sha256: 64611559f6262460d4ebbf4e881a5386098f46be6babf98134522958f0070b53

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

def f1(&blk)
  yield
  blk
end
def log1(a, r, c); end
f1 do |a, *r, c|
  log1(a, r, c)
end

def f2(&blk)
  yield :a
  blk
end
def log2(a, r, c); end
f2 do |a, *r, c|
  log2(a, r, c)
end

def f3(&blk)
  yield :a, :b
  blk
end
def log3(a, r, c); end
f3 do |a, *r, c|
  log3(a, r, c)
end

def f4(&blk)
  yield :a, :b, :c
  blk
end
def log4(a, r, c); end
f4 do |a, *r, c|
  log4(a, r, c)
end

def f5(&blk)
  yield :a, :b, :c, :d
  blk
end
def log5(a, r, c); end
f5 do |a, *r, c|
  log5(a, r, c)
end

__END__
# Classes
class Object
  private
  def f1 : { -> nil } -> ^(nil, *bot, nil) -> nil
  def log1 : (nil, Array[bot], nil) -> nil
  def f2 : { (:a) -> nil } -> ^(:a, *bot, nil) -> nil
  def log2 : (:a, Array[bot], nil) -> nil
  def f3 : { (:a, :b) -> nil } -> ^(:a, *bot, :b) -> nil
  def log3 : (:a, Array[bot], :b) -> nil
  def f4 : { (:a, :b, :c) -> nil } -> ^(:a, *:b, :c) -> nil
  def log4 : (:a, [:b], :c) -> nil
  def f5 : { (:a, :b, :c, :d) -> nil } -> (^(:a, *:b | :c, :d) -> nil)
  def log5 : (:a, [:b, :c], :d) -> nil
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
typeprof-0.8.0 smoke/block-args2.rb