Class: Jade::Frontend::ForwardDeclaration::Error::TupleArityOverflow
- Defined in:
- lib/jade/frontend/forward_declaration/error/tuple_arity_overflow.rb
Constant Summary collapse
- MAX_ARITY =
4
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(entry, span, arity:) ⇒ TupleArityOverflow
constructor
A new instance of TupleArityOverflow.
- #label ⇒ Object
- #message ⇒ Object
Methods inherited from Error
#candidates, #notes, #queried_name, #to_diagnostic
Constructor Details
#initialize(entry, span, arity:) ⇒ TupleArityOverflow
Returns a new instance of TupleArityOverflow.
8 9 10 11 |
# File 'lib/jade/frontend/forward_declaration/error/tuple_arity_overflow.rb', line 8 def initialize(entry, span, arity:) super(entry:, span:) @arity = arity end |
Instance Method Details
#label ⇒ Object
18 19 20 |
# File 'lib/jade/frontend/forward_declaration/error/tuple_arity_overflow.rb', line 18 def label "#{@arity}-tuple" end |
#message ⇒ Object
13 14 15 16 |
# File 'lib/jade/frontend/forward_declaration/error/tuple_arity_overflow.rb', line 13 def "Tuple of #{@arity} items is too big — tuples cap at #{MAX_ARITY}. " \ "Use a record or a struct." end |