Skip to content

Add details for non-promotion causes/workarounds #2940

@kwalrath

Description

@kwalrath

Details in dart-lang/sdk#44900.

#3148 partially addressed this issue by adding the following:

https://dart.dev/tools/non-promotion-reasons
https://dart.dev/go/non-promo-write
https://dart.dev/go/non-promo-property
https://dart.dev/go/non-promo-this

The current plan is to have one go link for each kind of non-promotion, with each go link redirecting to a section of this new page. See dart-lang/sdk#44900 (comment) for all 11 proposed go links.

Example from Lasse & mit

Note that BadEvent needs to use year! because year could have been changed by an overriding getter in a subclass. GoodEvent shadows year with a local variable (var year = this.year) so that the code can just use year.

Metadata

Metadata

Assignees

Labels

dev.null-safetyRelates to transforming or migrating Dart code to sound null safetye2-daysCan complete in < 5 days of normal, not dedicated, workp1-highMajor but not urgent concern: Resolve in months. Update each month.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions