Class: Steep::Diagnostic::Signature::UnsatisfiableTypeApplication

Inherits:
Base
  • Object
show all
Includes:
ResultPrinter2
Defined in:
lib/steep/diagnostic/signature.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods included from ResultPrinter2

#detail_lines, #result_line

Methods inherited from Base

#detail_lines, #diagnostic_code, #path

Methods included from Helper

#error_name, #full_message

Constructor Details

#initialize(type_name:, type_arg:, type_param:, result:, location:) ⇒ UnsatisfiableTypeApplication

Returns a new instance of UnsatisfiableTypeApplication.



112
113
114
115
116
117
118
# File 'lib/steep/diagnostic/signature.rb', line 112

def initialize(type_name:, type_arg:, type_param:, result:, location:)
  super(location: location)
  @type_name = type_name
  @type_arg = type_arg
  @type_param = type_param
  @result = result
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



108
109
110
# File 'lib/steep/diagnostic/signature.rb', line 108

def result
  @result
end

#type_argObject (readonly)

Returns the value of attribute type_arg.



106
107
108
# File 'lib/steep/diagnostic/signature.rb', line 106

def type_arg
  @type_arg
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



105
106
107
# File 'lib/steep/diagnostic/signature.rb', line 105

def type_name
  @type_name
end

#type_paramObject (readonly)

Returns the value of attribute type_param.



107
108
109
# File 'lib/steep/diagnostic/signature.rb', line 107

def type_param
  @type_param
end

Instance Method Details

#header_lineObject



120
121
122
# File 'lib/steep/diagnostic/signature.rb', line 120

def header_line
  "Type application of `#{type_name}` doesn't satisfy the constraints: #{type_arg} <: #{type_param.upper_bound}"
end