Skip to content

Commit

Permalink
Private final field promo for abstract getters (#5559)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaryaBelanger authored Feb 15, 2024
1 parent 25ec65e commit 59b4d26
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/content/tools/non-promotion-reasons.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,8 @@ f(C c) {
```

:::note
There is a [known bug] (as of Dart 3.2) where flow analysis doesn't
consider `abstract` getters stable enough to allow type promotion
(though they technically are).
This will be fixed in a future release.
In the meantime, replacing an abstract getter with an [abstract field][]
will allow you to work around this bug.
Flow analysis considers `abstract` getters stable enough to allow type promotion,
as long as there are no conflicting declarations.
:::

[known bug]: https://github.com/dart-lang/language/issues/3328#issuecomment-1792511446
Expand Down

0 comments on commit 59b4d26

Please sign in to comment.