Class: Steep::Subtyping::Constraints::UnsatisfiedInvariantError::UnknownsFreeVariableNotDisjoint

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(var:, lower_bound:, upper_bound:) ⇒ UnknownsFreeVariableNotDisjoint

Returns a new instance of UnknownsFreeVariableNotDisjoint.



47
48
49
50
51
# File 'lib/steep/subtyping/constraints.rb', line 47

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

Instance Attribute Details

#lower_boundObject (readonly)

Returns the value of attribute lower_bound.



45
46
47
# File 'lib/steep/subtyping/constraints.rb', line 45

def lower_bound
  @lower_bound
end

#upper_boundObject (readonly)

Returns the value of attribute upper_bound.



44
45
46
# File 'lib/steep/subtyping/constraints.rb', line 44

def upper_bound
  @upper_bound
end

#varObject (readonly)

Returns the value of attribute var.



43
44
45
# File 'lib/steep/subtyping/constraints.rb', line 43

def var
  @var
end

Instance Method Details

#messageObject



53
54
55
# File 'lib/steep/subtyping/constraints.rb', line 53

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