#primary
[ GitHub ]# File 'lib/rbs/environment.rb', line 80
def primary raise "Not implemented" end
123456789_123456789_123456789_123456789_123456789_
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | lib/rbs/environment.rb |
_ = Struct.new(:decl, :outer, keyword_init: true) do # @implements D[M] include ContextUtil def context @context ||= calculate_context(outer + [decl]) end end
MultiEntry
# File 'lib/rbs/environment.rb', line 43
def initialize(name:) @name = name @decls = [] end
# File 'lib/rbs/environment.rb', line 41
attr_reader :decls
# File 'lib/rbs/environment.rb', line 40
attr_reader :name
Boolean
# File 'lib/rbs/environment.rb', line 80
def primary raise "Not implemented" end
# File 'lib/rbs/environment.rb', line 76
def type_params primary.decl.type_params end
# File 'lib/rbs/environment.rb', line 53
def validate_type_params unless decls.empty? hd_decl, *tl_decls = decls raise unless hd_decl hd_params = hd_decl.decl.type_params tl_decls.each do |tl_decl| tl_params = tl_decl.decl.type_params unless compatible_params?(hd_params, tl_params) raise GenericParameterMismatchError.new(name: name, decl: _ = tl_decl.decl) end end end end