Class: Steep::Diagnostic::Signature::RecursiveTypeAlias

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(alias_names:, location:) ⇒ RecursiveTypeAlias

Returns a new instance of RecursiveTypeAlias.



400
401
402
403
# File 'lib/steep/diagnostic/signature.rb', line 400

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

Instance Attribute Details

#alias_namesObject (readonly)

Returns the value of attribute alias_names.



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

def alias_names
  @alias_names
end

Instance Method Details

#header_lineObject



405
406
407
# File 'lib/steep/diagnostic/signature.rb', line 405

def header_line
  "Type aliases cannot be *directly recursive*: #{alias_names.join(", ")}"
end