class TypeProf::Core::AST::SigFuncType::SigTyAliasNode::SigTyUnionNode
Attributes
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 460 def initialize(raw_decl, lenv) super(raw_decl, lenv) @types = (raw_decl.types || []).map {|type| AST.create_rbs_type(type, lenv) } end
Calls superclass method
TypeProf::Core::AST::Node::new
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 475 def contravariant_vertex0(genv, changes, vtx, subst) @types.each do |type| type.contravariant_vertex0(genv, changes, vtx, subst) end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 469 def covariant_vertex0(genv, changes, vtx, subst) @types.each do |type| type.covariant_vertex0(genv, changes, vtx, subst) end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 488 def show @types.map {|ty| ty.show }.join(" | ") end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 467 def subnodes = { types: } def covariant_vertex0(genv, changes, vtx, subst) @types.each do |type| type.covariant_vertex0(genv, changes, vtx, subst) end end def contravariant_vertex0(genv, changes, vtx, subst) @types.each do |type| type.contravariant_vertex0(genv, changes, vtx, subst) end end def typecheck(genv, changes, vtx, subst) @types.each do |type| return true if type.typecheck(genv, changes, vtx, subst) end false end def show @types.map {|ty| ty.show }.join(" | ") end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 481 def typecheck(genv, changes, vtx, subst) @types.each do |type| return true if type.typecheck(genv, changes, vtx, subst) end false end