Class: TypeProf::Type::Literal
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::TypeProf::Type
|
|
Instance Chain:
|
|
Inherits: |
TypeProf::Type
|
Defined in: | lib/typeprof/type.rb |
Overview
A local type
Constant Summary
::TypeProf::Type
- Inherited
Class Method Summary
- .new(lit, base_type) ⇒ Literal constructor
::TypeProf::Type
- Inherited
Instance Attribute Summary
- #base_type readonly
- #lit readonly
Instance Method Summary
- #consistent?(_other) ⇒ Boolean
- #globalize(_env, _visited, _depth)
- #inspect
- #method_dispatch_info
- #screen_name(scratch)
::TypeProf::Type
- Inherited
Constructor Details
.new(lit, base_type) ⇒ Literal
Instance Attribute Details
#base_type (readonly)
[ GitHub ]# File 'lib/typeprof/type.rb', line 702
attr_reader :lit, :base_type
#lit (readonly)
[ GitHub ]# File 'lib/typeprof/type.rb', line 702
attr_reader :lit, :base_type
Instance Method Details
#consistent?(_other) ⇒ Boolean
# File 'lib/typeprof/type.rb', line 720
def consistent?(_other) raise "should not called" end
#globalize(_env, _visited, _depth)
[ GitHub ]# File 'lib/typeprof/type.rb', line 712
def globalize(_env, _visited, _depth) @base_type end
#inspect
[ GitHub ]# File 'lib/typeprof/type.rb', line 704
def inspect "Type::Literal[#{ @lit.inspect }, #{ @base_type.inspect }]" end
#method_dispatch_info
[ GitHub ]# File 'lib/typeprof/type.rb', line 716
def method_dispatch_info @base_type.method_dispatch_info end
#screen_name(scratch)
[ GitHub ]# File 'lib/typeprof/type.rb', line 708
def screen_name(scratch) @base_type.screen_name(scratch) + "<#{ @lit.inspect }>" end