Class: Steep::Diagnostic::Signature::TypeParamDefaultReferenceError

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

Instance Attribute Summary collapse

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods inherited from Base

#detail_lines, #diagnostic_code, #path

Methods included from Helper

#error_name, #full_message

Constructor Details

#initialize(type_param, location:) ⇒ TypeParamDefaultReferenceError

Returns a new instance of TypeParamDefaultReferenceError.



468
469
470
471
# File 'lib/steep/diagnostic/signature.rb', line 468

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

Instance Attribute Details

#type_paramObject (readonly)

Returns the value of attribute type_param.



466
467
468
# File 'lib/steep/diagnostic/signature.rb', line 466

def type_param
  @type_param
end

Instance Method Details

#header_lineObject



473
474
475
# File 'lib/steep/diagnostic/signature.rb', line 473

def header_line
  "The default type of `#{type_param.name}` cannot depend on optional type parameters"
end