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.



433
434
435
436
# File 'lib/steep/diagnostic/signature.rb', line 433

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.



431
432
433
# File 'lib/steep/diagnostic/signature.rb', line 431

def type_param
  @type_param
end

Instance Method Details

#header_lineObject



438
439
440
# File 'lib/steep/diagnostic/signature.rb', line 438

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