class TypeProf::Core::AST::SigFuncType::SigTyAliasNode::SigTyUnionNode::SigTyIntersectionNode::SigTySingletonNode::SigTyInstanceNode::SigTyTupleNode::SigTyRecordNode::SigTyVarNode::SigTyOptionalNode
Attributes
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 839 def initialize(raw_decl, lenv) super(raw_decl, lenv) @type = AST.create_rbs_type(raw_decl.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 852 def contravariant_vertex0(genv, changes, vtx, subst) @type.contravariant_vertex0(genv, changes, vtx, subst) changes.add_edge(genv, Source.new(genv.nil_type), vtx) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 847 def covariant_vertex0(genv, changes, vtx, subst) @type.covariant_vertex0(genv, changes, vtx, subst) changes.add_edge(genv, Source.new(genv.nil_type), vtx) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 861 def show s = @type.show if @type.is_a?(SigTyIntersectionNode) || @type.is_a?(SigTyUnionNode) s = "(#{ s })" end s + "?" end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 845 def subnodes = { type: } def covariant_vertex0(genv, changes, vtx, subst) @type.covariant_vertex0(genv, changes, vtx, subst) changes.add_edge(genv, Source.new(genv.nil_type), vtx) end def contravariant_vertex0(genv, changes, vtx, subst) @type.contravariant_vertex0(genv, changes, vtx, subst) changes.add_edge(genv, Source.new(genv.nil_type), vtx) end def typecheck(genv, changes, vtx, subst) @type.typecheck(genv, changes, vtx, subst) end def show s = @type.show if @type.is_a?(SigTyIntersectionNode) || @type.is_a?(SigTyUnionNode) s = "(#{ s })" end s + "?" end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 857 def typecheck(genv, changes, vtx, subst) @type.typecheck(genv, changes, vtx, subst) end