Class RecordCarriesDataOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.RecordCarriesDataOrError
- All Implemented Interfaces:
Consumer<AggregateSymbol>
F1 (Steve, 2026-10-07): a record exists only to carry data, so a CONCRETE record with no fields, counting inherited
ones, is an error (E07237). An abstract field-less record stays legal - it is the root of a record hierarchy (a
polymorphic 'Contact' whose sub-records carry the data) - and so does a sub-record that adds no fields but
inherits some. Records never get the synthesised '?' that a field-less class, component or service gets
(
FieldlessIsSet): with this rule every concrete record has a field, and so defines its own '?' (E07235).
"Has fields" is THE shared predicate, GeneratedOperatorFields.anyIncludingInherited(IAggregateSymbol). Checked in
FULL_RESOLUTION, beside its sister rule E07235 (a record WITH fields must say what 'set' means): every super is
linked by the end of EXPLICIT_TYPE_SYMBOL_DEFINITION, whatever order the declarations and sources came in, and
this phase has the error listener that phase 2's post-passes do not.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionRecordCarriesDataOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
RecordCarriesDataOrError
RecordCarriesDataOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<AggregateSymbol>
-