-
Notifications
You must be signed in to change notification settings - Fork 223
Description
I'm working on simplifying augmentations now that we don't need to support full macro generality.
My recollection from a previous language meeting is that we want eliminate augmented
and allowing an augmentation to wrap existing code. The goal is to make it so that an introductory declaration and all of its augmentations form a non-overlapping union of disjoint declarations. That way, we don't have to define any sort of augmentation application order.
Disallowing an augmentation from replacing/wrapping an existing (non-"augmentation abstract") member covers much of this.
But augmentations are also allowed to append to a type declaration's with
and implements
clauses. I'm not sure if the order of types in an implements
clause is user-visible, but the order of mixins in a with
clause certainly is if they happen to override the same instance member.
Any thoughts on how we should handle this in augmentations? We do know that some code generators have use cases for adding to the implements
and with
clauses, so disallowing augmentations from touching those entirely is probably too restrictive.