Exception: Steep::Subtyping::Constraints::UnsatisfiableConstraint

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(var:, sub_type:, super_type:, result:) ⇒ UnsatisfiableConstraint

Returns a new instance of UnsatisfiableConstraint.



65
66
67
68
69
70
71
72
# File 'lib/steep/subtyping/constraints.rb', line 65

def initialize(var:, sub_type:, super_type:, result:)
  @var = var
  @sub_type = sub_type
  @super_type = super_type
  @result = result

  super "Unsatisfiable constraint on #{var}: #{sub_type} <: #{super_type}"
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



63
64
65
# File 'lib/steep/subtyping/constraints.rb', line 63

def result
  @result
end

#sub_typeObject (readonly)

Returns the value of attribute sub_type.



61
62
63
# File 'lib/steep/subtyping/constraints.rb', line 61

def sub_type
  @sub_type
end

#super_typeObject (readonly)

Returns the value of attribute super_type.



62
63
64
# File 'lib/steep/subtyping/constraints.rb', line 62

def super_type
  @super_type
end

#varObject (readonly)

Returns the value of attribute var.



60
61
62
# File 'lib/steep/subtyping/constraints.rb', line 60

def var
  @var
end