class TypeProf::Core::CRef
Constants
- Toplevel
Attributes
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env.rb, line 370 def initialize(cpath, scope_level, mid, outer) @cpath = cpath @scope_level = scope_level @mid = mid @outer = outer end
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env.rb, line 379 def get_self(genv) case @scope_level when :instance mod = genv.resolve_cpath(@cpath || []) type_params = mod.type_params.map {|ty_param| Source.new() } # TODO: better support ty = Type::Instance.new(genv, mod, type_params) Source.new(ty) when :class Source.new(Type::Singleton.new(genv, genv.resolve_cpath(@cpath || []))) else Source.new() end end