Skip to content
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

Removed incorrect claim about promotability #3339

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

eernstg
Copy link
Member

@eernstg eernstg commented Sep 12, 2023

We used to have a hint in the extension type feature specification that the representation variable can be promoted just like a final local variable. This is not true (cf. dart-lang/sdk#53446 (comment)). This PR changes the feature specification such that it does not make that claim any more.

Correction: Promotion of the representation variable is sound, cf. dart-lang/sdk#53446 (comment). However, this PR still cleans up the text.

Another PR will follow when we have decided on the applicability of promotion to representation variables, cf. #3342.

@@ -274,6 +274,7 @@ leaves, and nothing else.
```dart
extension type TinyJson(Object it) {
Iterable<num> get leaves sync* {
final it = this.it; // To get promotion.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hope it will be val one day.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, cf. #3332. ;-)

@eernstg eernstg merged commit 4d1e996 into main Sep 13, 2023
@eernstg eernstg deleted the specify_ext_type_nopromotion_sep23 branch September 13, 2023 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants