Class: Steep::Subtyping::Constraints::UnsatisfiedInvariantError::VariablesFreeVariablesNotDisjoint

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/subtyping/constraints.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(var: nil, lower_bound: nil, upper_bound: nil) ⇒ VariablesFreeVariablesNotDisjoint

Returns a new instance of VariablesFreeVariablesNotDisjoint.



31
32
33
34
35
# File 'lib/steep/subtyping/constraints.rb', line 31

def initialize(var: nil, lower_bound: nil, upper_bound: nil)
  @var = var
  @lower_bound = lower_bound
  @upper_bound = upper_bound
end

Instance Attribute Details

#lower_boundObject (readonly)

Returns the value of attribute lower_bound.



28
29
30
# File 'lib/steep/subtyping/constraints.rb', line 28

def lower_bound
  @lower_bound
end

#upper_boundObject (readonly)

Returns the value of attribute upper_bound.



29
30
31
# File 'lib/steep/subtyping/constraints.rb', line 29

def upper_bound
  @upper_bound
end

#varObject (readonly)

Returns the value of attribute var.



27
28
29
# File 'lib/steep/subtyping/constraints.rb', line 27

def var
  @var
end

Instance Method Details

#messageObject



37
38
39
# File 'lib/steep/subtyping/constraints.rb', line 37

def message
  "Variables and FV(constraints) should be disjoint (#{var}, #{lower_bound}, #{upper_bound})"
end