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.



404
405
406
407
408
409
410
411
# File 'lib/steep/errors.rb', line 404

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.



398
399
400
# File 'lib/steep/errors.rb', line 398

def method_type
  @method_type
end

#resultObject (readonly)

Returns the value of attribute result.



402
403
404
# File 'lib/steep/errors.rb', line 402

def result
  @result
end

#sub_typeObject (readonly)

Returns the value of attribute sub_type.



400
401
402
# File 'lib/steep/errors.rb', line 400

def sub_type
  @sub_type
end

#super_typeObject (readonly)

Returns the value of attribute super_type.



401
402
403
# File 'lib/steep/errors.rb', line 401

def super_type
  @super_type
end

#varObject (readonly)

Returns the value of attribute var.



399
400
401
# File 'lib/steep/errors.rb', line 399

def var
  @var
end

Instance Method Details

#to_sObject



415
416
417
# File 'lib/steep/errors.rb', line 415

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