Normally, a trait should provide setter methods for its variables which preserve invariants associated with the trait's piece of state. So, if the user of a trait tries to modify those inherited variables directly (self.traitVar = 42), thus possibly violating the trait invariant, they should get a warning.
Normally, a trait should provide setter methods for its variables which preserve invariants associated with the trait's piece of state. So, if the user of a trait tries to modify those inherited variables directly (
self.traitVar = 42
), thus possibly violating the trait invariant, they should get a warning.