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.



369
370
371
372
# File 'lib/steep/diagnostic/signature.rb', line 369

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.



367
368
369
# File 'lib/steep/diagnostic/signature.rb', line 367

def alias_names
  @alias_names
end

Instance Method Details

#header_lineObject



374
375
376
# File 'lib/steep/diagnostic/signature.rb', line 374

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