In Files

  • typeprof-0.12.0/lib/typeprof/block.rb

Class/Module Index [+]

Quicksearch

TypeProf::CustomBlock

Public Class Methods

new(caller_ep, mid, &blk) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 142
def initialize(caller_ep, mid, &blk)
  @caller_ep = caller_ep
  @mid = mid
  @blk = blk
end
            

Public Instance Methods

consistent?(other) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 152
def consistent?(other)
  true # XXX
end
            
do_call(aargs, caller_ep, caller_env, scratch, replace_recv_ty:, &ctn) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 160
def do_call(aargs, caller_ep, caller_env, scratch, replace_recv_ty,, &ctn)
  aargs = scratch.globalize_type(aargs, caller_env, caller_ep)

  dummy_ctx = TypedContext.new(@caller_ep, @mid)

  scratch.add_block_signature!(self, aargs.to_block_signature)
  scratch.add_block_to_ctx!(self, dummy_ctx)

  @blk.call(aargs, caller_ep, caller_env, scratch, replace_recv_ty: replace_recv_ty) do |ret_ty, ep, env|
    scratch.add_return_value!(dummy_ctx, ret_ty)
    ctn[ret_ty, ep, env]
  end
end
            
inspect() click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 148
def inspect
  "#<CustomBlock>"
end
            
substitute(_subst, _depth) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/block.rb, line 156
def substitute(_subst, _depth)
  self
end