Skip to content

Commit 80ae9fc

Browse files
authored
Specify promotion of representation variables (#3411)
1 parent 3cdbe58 commit 80ae9fc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

accepted/future-releases/extension-types/feature-specification.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ information about the process, including in their change logs.
1515
[1]: https://github.com/dart-lang/language/blob/master/working/1426-extension-types/feature-specification-views.md
1616
[2]: https://github.com/dart-lang/language/blob/master/working/extension_structs/overview.md
1717

18+
2023.10.18
19+
- Specify how to promote the representation variable of an extension
20+
type.
21+
1822
2023.10.16
1923
- Add error for `implements ... T ... T ...`, like the corresponding
2024
error with classes, mixins, etc.
@@ -701,6 +705,17 @@ Member Conflicts' occur as well in an extension type declaration.
701705
and has an instance member named `V`, and it is a compile-time error if it
702706
has a type parameter named `X` and it has an instance member named `X`.*
703707

708+
If the representation name of an extension type is a private name `_n` then
709+
the representation variable is subject to promotion according to the rules
710+
about promotion of private instance variables, except that promotion is
711+
_not_ eliminated by the existence of other declarations (of any kind) named
712+
`_n` in the same library.
713+
714+
Conversely, the existence of an extension type with a representation
715+
variable with a private name `_n` does not eliminate promotion of
716+
any private instance variables named `_n` of a class, mixin, enum, or mixin
717+
class in the same library.
718+
704719
It is a compile-time error if a member declaration in an extension type
705720
declaration is abstract.
706721

0 commit comments

Comments
 (0)