Skip to content

[extension types] Specify promotion of representation variables #3411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions accepted/future-releases/extension-types/feature-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ information about the process, including in their change logs.
[1]: https://github.com/dart-lang/language/blob/master/working/1426-extension-types/feature-specification-views.md
[2]: https://github.com/dart-lang/language/blob/master/working/extension_structs/overview.md

2023.10.18
- Specify how to promote the representation variable of an extension
type.

2023.10.16
- Add error for `implements ... T ... T ...`, like the corresponding
error with classes, mixins, etc.
Expand Down Expand Up @@ -701,6 +705,17 @@ Member Conflicts' occur as well in an extension type declaration.
and has an instance member named `V`, and it is a compile-time error if it
has a type parameter named `X` and it has an instance member named `X`.*

If the representation name of an extension type is a private name `_n` then
the representation variable is subject to promotion according to the rules
about promotion of private instance variables, except that promotion is
_not_ eliminated by the existence of other declarations (of any kind) named
`_n` in the same library.

Conversely, the existence of an extension type with a representation
variable with a private name `_n` does not eliminate promotion of
any private instance variables named `_n` of a class, mixin, enum, or mixin
class in the same library.

It is a compile-time error if a member declaration in an extension type
declaration is abstract.

Expand Down