# File typeprof-0.21.1/lib/typeprof/analyzer.rb, line 133
def initialize(recv_ty, blk_ty, mod_func, pub_meth)
@recv_ty = recv_ty
@blk_ty = blk_ty
@mod_func = mod_func
@pub_meth = pub_meth
return if recv_ty == :top #OK
recv_ty.each_child_global do |ty|
raise ty.inspect if !ty.is_a?(Type::Instance) && !ty.is_a?(Type::Class) && !ty.is_a?(Type::Symbol) && ty != Type.any
end
end
# File typeprof-0.21.1/lib/typeprof/analyzer.rb, line 147
def merge(other)
recv_ty = @recv_ty.union(other.recv_ty)
blk_ty = @blk_ty.union(other.blk_ty)
mod_func = @mod_func & other.mod_func # ??
pub_meth = @pub_meth & other.pub_meth # ??
StaticEnv.new(recv_ty, blk_ty, mod_func, pub_meth)
end