-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow] Part 3 Issue 3658 Avoid writing promotion information for post…
…fix 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]>
- Loading branch information
Showing
3 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters