class Steep::TypeInference::Context::TypeVariableContext
def self.empty
def self.empty new([]) end
def [](name)
def [](name) table.fetch(name).upper_bound end
def initialize(type_params, parent_context: nil)
def initialize(type_params, parent_context: nil) @type_params = type_params @table = {} table.merge!(parent_context.table) if parent_context type_params.each do |param| table[param.name] = param end end
def upper_bounds
def upper_bounds @upper_bounds ||= table.each_value.with_object({}) do |type_param, bounds| #$ Hash[Symbol, AST::Types::t] if type_param.upper_bound bounds[type_param.name] = type_param.upper_bound end end end