class TypedRb::Model::TmInstanceVar

instance variable

Attributes

val[RW]

Public Class Methods

new(val, node) click to toggle source
Calls superclass method TypedRb::Model::Expr::new
# File lib/typed/model/tm_instance_var.rb, line 9
def initialize(val, node)
  super(node)
  @val = val
end

Public Instance Methods

check_type(context) click to toggle source
# File lib/typed/model/tm_instance_var.rb, line 14
def check_type(context)
  self_type = context.get_type_for(:self)
  type = self_type.find_var_type(val)
  fail TypeCheckError.new("Error type checking instance variable #{val}: Cannot find type for variable.", node) if type.nil?
  type
end