You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flow] Part 3 Issue 3658 Avoid writing promotion information for postfix inc/dec expressions.
Postfix increment and decrement expressions should not be saving any promotion information.
An example of where saving the promotion information after the write is unsafe is:
```
class A {
A operator +(int i) {
return new B();
}
}
class B extends A {}
main() {
A x = A();
if ((x++) is B) {
// x should not be B
}
}
```
This change is only for the analyzer because the CFE does something different (converts the postfix increment/decrement into a let expression).
Bug: dart-lang/language#3658
Change-Id: Ic22f69bf79da66965908ade80bdf70399f0bcaa3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391494
Reviewed-by: Paul Berry <[email protected]>
Commit-Queue: Kallen Tu <[email protected]>
0 commit comments