Class: Steep::Errors::UnsatisfiableConstraint

Inherits:
Base
  • Object
show all
Includes:
ResultPrinter
Defined in:
lib/steep/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#node

Instance Method Summary collapse

Methods included from ResultPrinter

#print_result_to, #print_to

Methods inherited from Base

#location_to_str, #print_to

Constructor Details

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

Returns a new instance of UnsatisfiableConstraint.



426
427
428
429
430
431
432
433
# File 'lib/steep/errors.rb', line 426

def initialize(node:, method_type:, var:, sub_type:, super_type:, result:)
  super(node: node)
  @method_type = method_type
  @var = var
  @sub_type = sub_type
  @super_type = super_type
  @result = result
end

Instance Attribute Details

#method_typeObject (readonly)

Returns the value of attribute method_type.



420
421
422
# File 'lib/steep/errors.rb', line 420

def method_type
  @method_type
end

#resultObject (readonly)

Returns the value of attribute result.



424
425
426
# File 'lib/steep/errors.rb', line 424

def result
  @result
end

#sub_typeObject (readonly)

Returns the value of attribute sub_type.



422
423
424
# File 'lib/steep/errors.rb', line 422

def sub_type
  @sub_type
end

#super_typeObject (readonly)

Returns the value of attribute super_type.



423
424
425
# File 'lib/steep/errors.rb', line 423

def super_type
  @super_type
end

#varObject (readonly)

Returns the value of attribute var.



421
422
423
# File 'lib/steep/errors.rb', line 421

def var
  @var
end

Instance Method Details

#to_sObject



437
438
439
# File 'lib/steep/errors.rb', line 437

def to_s
  "#{location_to_str}: UnsatisfiableConstraint: method_type=#{method_type}, constraint=#{sub_type} <: '#{var} <: #{super_type}"
end