11# Augmentations
22
33Author: rnystrom@google.com , jakemac@google.com , lrn@google.com <br >
4- Version: 1.27 (see [ Changelog] ( #Changelog ) at end)
4+ Version: 1.28 (see [ Changelog] ( #Changelog ) at end)
55
66Augmentations allow spreading your implementation across multiple locations,
77both within a single file and across multiple files. They can add new top-level
@@ -679,8 +679,7 @@ It is a **compile-time error** if:
679679* An augmenting declaration uses ` augmented ` when the augmented declaration
680680 has no concrete implementation. Note that all external declarations are
681681 assumed to have an implementation provided by another external source, and
682- otherwise they will throw a runtime error when called. An ` abstract `
683- variable introduces no implementation.
682+ otherwise they will throw a runtime error when called.
684683
685684* An augmenting variable’s initializing expression uses ` augmented ` , and
686685 the stack of augmented declarations do not include a variable with an
@@ -706,9 +705,6 @@ It is a **compile-time error** if:
706705
707706* A getter or setter declaration is augmented by an augmenting variable.
708707
709- * An abstract or external variable declaration is augmented by an
710- augmenting variable.
711-
712708* A late final variable with no initializer expression is augmented by an
713709 augmenting variable with an initializer expression.
714710 _ A late final variable with no initializer has a setter, while one with an
@@ -719,6 +715,12 @@ It is a **compile-time error** if:
719715 const variable be augmented by another const variable, changing its value,
720716 or is that too weird?)**
721717
718+ * An ` abstract ` variable is augmented with a non-abstract variable, getter,
719+ or setter.
720+
721+ * An ` external ` declaration is augmented with an ` abstract ` declaration. For
722+ variables this also applies to the implicit getter and setter.
723+
722724### Augmenting enum values
723725
724726Enum values can _ only_ be augmented by enum values, and the implicit getter
@@ -1352,6 +1354,15 @@ to the augmentation.
13521354
13531355## Changelog
13541356
1357+ ### 1.28
1358+
1359+ * Explicitly disallow augmenting abstract variables with non-abstract
1360+ variables, getters, or setters.
1361+ * Explicitly disallow augmenting external declarations with abstract
1362+ declarations.
1363+ * Remove error when augmenting an abstract or external variable with a
1364+ variable (allowed for adding comments/annotations).
1365+
13551366### 1.27
13561367
13571368* Specify that representation objects for extension types cannot be augmented.
0 commit comments