Skip to content

Fixes #2668. Reorder switch expressions to avoid flow analysis secondary issues #2693

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

Merged
merged 1 commit into from
May 29, 2024

Conversation

sgrekhov
Copy link
Contributor

The fix suggested in this comment dart-lang/sdk#53392 (comment) doesn’t work. Adding {...} doesn’t help, but reordering does.

It’s hard for me to explain why I preserved i4 expecting no error. To me, it seems useful to have these issues somewhere in the tests. If, one day, someone fixes it (probably unintentionally), and flow analysis starts reporting an error for i4 too, then the tests will fail, and the author will know that (s)he fixed it as well.

If you believe that it is not necessary, let me know, and I’ll remove it. At least there is no issue in real life. To make the code work, people have to fix all their issues, and eventually, the unreported ones become the first one and will be reported.

Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

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

LGTM

@eernstg eernstg merged commit e8cb93f into dart-lang:master May 29, 2024
2 checks passed
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jun 3, 2024
2024-05-30 [email protected] dart-lang/co19#2641. Add super parameters tests (dart-lang/co19#2687)
2024-05-29 [email protected] Fixes dart-lang/co19#2678. Add more extension types static vs instance conflict tests (dart-lang/co19#2692)
2024-05-29 [email protected] Fixes dart-lang/co19#2668. Reorder switch expressions to avoid flow analysis secondary issues (dart-lang/co19#2693)
2024-05-28 [email protected] dart-lang/co19#2641. Add external functions and covariant parameters tests (dart-lang/co19#2691)
2024-05-28 [email protected] Fixes dart-lang/co19#2689. Add more extension methods tests (dart-lang/co19#2690)
2024-05-27 [email protected] dart-lang/co19#2641. Add extension types tests (dart-lang/co19#2688)

[email protected]

Change-Id: Ie5c551e3198e748b55d45ec5039d1ff836444ee2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369000
Auto-Submit: Sergey Grekhov <[email protected]>
Reviewed-by: Alexander Thomas <[email protected]>
Reviewed-by: Erik Ernst <[email protected]>
Commit-Queue: Alexander Thomas <[email protected]>
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.

2 participants