Class: Jade::Frontend::SemanticAnalysis::Error::KwargsOnNonConstructor

Inherits:
Error
  • Object
show all
Defined in:
lib/jade/frontend/semantic_analysis/error/kwargs_on_non_constructor.rb

Instance Attribute Summary

Attributes inherited from Error

#entry, #span

Instance Method Summary collapse

Methods inherited from Error

#candidates, #label, #notes, #queried_name, #to_diagnostic

Constructor Details

#initialize(entry, span) ⇒ KwargsOnNonConstructor

Returns a new instance of KwargsOnNonConstructor.



6
7
8
# File 'lib/jade/frontend/semantic_analysis/error/kwargs_on_non_constructor.rb', line 6

def initialize(entry, span)
  super(entry:, span:)
end

Instance Method Details

#messageObject



10
11
12
# File 'lib/jade/frontend/semantic_analysis/error/kwargs_on_non_constructor.rb', line 10

def message
  "Keyword-argument syntax is only valid for struct or variant constructors"
end