Class NoRedundantTraitsOrError
- All Implemented Interfaces:
Consumer<AggregateWithTraitsSymbol>
with trait of LoudSpeaker, Speaker where
LoudSpeaker with trait of Speaker - is E02090 (Steve, 2026-10-11): the second name adds nothing, and it
used to surface in FULL_RESOLUTION as E06150 "method 'speak' on 'Speaker' and 'Speaker'", one trait named twice.
A listed trait the SUPER CLASS already has is E02090 too (Steve, 2026-10-12, decision (a)): Announcer extends
Base with trait of Speaker where Base with trait of Speaker - directly, through the super's traits or
further up the super chain - is "'Speaker' is already a trait of 'Base'".
Re-listing it by a delegate (Announcer extends Base with trait of Speaker by speaker) is the same
error, but it does not say "list it once": the holder already provides the trait, so it cannot be delegated again
here (Steve, 2026-10-12), and deleting the name would silently drop the delegation - no one reading, no repair.
Reported once per redundant name (a listed holder named before the super class), whichever order the traits are
listed in and however deep the inheritance. A diamond - two different listed traits, or the super class and a
listed trait, sharing a trait that is NOT listed - is legal (its shared methods are one method each), and a real
conflict between different bodies stays E06150. Run only once the hierarchy is free of loops
(getAllTraits() recurses unguarded). The message names the trait and its holder so the source repair
(repair/RedundantTraitReference) can delete the redundant name - its one reading.
-
Constructor Details
-
NoRedundantTraitsOrError
NoRedundantTraitsOrError(ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<AggregateWithTraitsSymbol>
-