Skip to content

Commit f35ecd9

Browse files
authored
specify that representation objects for extension types cannot be augmented (#3999)
closes dart-lang/sdk#56341 cc @sgrekhov
1 parent ff6256e commit f35ecd9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

working/augmentation-libraries/feature-specification.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Augmentations
22

33
4-
Version: 1.26 (see [Changelog](#Changelog) at end)
4+
Version: 1.27 (see [Changelog](#Changelog) at end)
55

66
Augmentations allow spreading your implementation across multiple locations,
77
both within a single file and across multiple files. They can add new top-level
@@ -936,6 +936,11 @@ conversions that sidestep the constructor.)*
936936
other types in which case the extension type syntax will then be understood by
937937
users to be a primary constructor for the extension type.*
938938

939+
The extension type's representation object is _not_ a variable, even though it
940+
looks and behaves much like one, and it cannot be augmented as such. It is a
941+
compile time error to have any augmenting declaration with the same name as the
942+
representation object.
943+
939944
[primary constructors]:
940945
https://github.com/dart-lang/language/blob/main/working/2364%20-%20primary%20constructors/feature-specification.md
941946

@@ -1347,6 +1352,10 @@ to the augmentation.
13471352

13481353
## Changelog
13491354

1355+
### 1.27
1356+
1357+
* Specify that representation objects for extension types cannot be augmented.
1358+
13501359
### 1.26
13511360

13521361
* Recreate the change made in 1.23 (which was undone by accident).

0 commit comments

Comments
 (0)