class TypeProf::Type::Literal

A local type

Attributes

base_type[R]
lit[R]

Public Class Methods

new(lit, base_type) click to toggle source
# File typeprof-0.21.8/lib/typeprof/type.rb, line 700
def initialize(lit, base_type)
  @lit = lit
  @base_type = base_type
end

Public Instance Methods

consistent?(_other) click to toggle source
# File typeprof-0.21.8/lib/typeprof/type.rb, line 723
def consistent?(_other)
  raise "should not called"
end
globalize(_env, _visited, _depth) click to toggle source
# File typeprof-0.21.8/lib/typeprof/type.rb, line 715
def globalize(_env, _visited, _depth)
  @base_type
end
inspect() click to toggle source
# File typeprof-0.21.8/lib/typeprof/type.rb, line 707
def inspect
  "Type::Literal[#{ @lit.inspect }, #{ @base_type.inspect }]"
end
method_dispatch_info() click to toggle source
# File typeprof-0.21.8/lib/typeprof/type.rb, line 719
def method_dispatch_info
  @base_type.method_dispatch_info
end
screen_name(scratch) click to toggle source
# File typeprof-0.21.8/lib/typeprof/type.rb, line 711
def screen_name(scratch)
  @base_type.screen_name(scratch) + "<#{ @lit.inspect }>"
end