# File lib/type_checker.rb, line 815 def process_rescue(exp) # TODO: I think there is also an else stmt. Should make it # mandatory, not optional. # TODO: test me try_block = process exp.shift rescue_block = process exp.shift ensure_block = process exp.shift try_type = try_block.sexp_type rescue_type = rescue_block.sexp_type ensure_type = ensure_block.sexp_type # FIX: not sure if I should unify try_type.unify rescue_type try_type.unify ensure_type return t(:rescue, try_block, rescue_block, ensure_block, try_type) end