class TypeProf::Core::AST::SigFuncType::SigTyAliasNode::SigTyUnionNode::SigTyIntersectionNode
Attributes
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 494 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 509 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 503 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 522 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 501 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 false unless type.typecheck(genv, changes, vtx, subst) end true 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 515 def typecheck(genv, changes, vtx, subst) @types.each do |type| return false unless type.typecheck(genv, changes, vtx, subst) end true end