Class AggregateMemberOrder

java.lang.Object
org.ek9lang.compiler.support.AggregateMemberOrder

public final class AggregateMemberOrder extends Object
THE order of the members of an aggregate body (E01086, Steve 2026-10-11): properties first, then constructors and methods, then operators (an explicit operator, override operator or default operator X, in any order among themselves), and a bare default operator as the LAST item of all.

The grammar (aggregateParts) accepts the members in any order, so the rule is stated once here and asked by every door that needs it: phase 1's AggregateMemberOrderOrError (the compile error), SyntaxProbe (so a text-layer repair such as DefaultOperatorLast still sees the error before a compile) and the formatter's member reordering (which splices contiguous sections and leaves an out-of-order body alone). Before 2026-10-11 the grammar enforced the order and ErrorListener.syntaxError relabelled ANTLR's recovery messages as E01086, with 2-3 cascades, and an @Error directive in front of the member defeated it.

Only the FIRST member out of order is reported, once per body: moving it may well settle the rest.