Skip to content

Explore the possibility of showing the user promotion attempt locations #44899

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

Open
stereotype441 opened this issue Feb 9, 2021 · 1 comment
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. model-flow Implementation of flow analysis in analyzer/cfe P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@stereotype441
Copy link
Member

stereotype441 commented Feb 9, 2021

(Parent issue #44897)

When a promotion attempt fails, it would be nice to provide the user with pointers to both the line of code that attempted the promotion and the line of code that made the promotion fail, e.g. in this code:

f(int? i, int? j) {
  if (i == null) return; // (1)
  i = j;                 // (2)
  i.isEven;              // (3)
}

it would be nice for the error message generated at (3) to point to both (1) (the site of the promotion attempt) and (2) the site of the code that defeated promotion). Currently we only point at (2).

@stereotype441 stereotype441 added legacy-area-analyzer Use area-devexp instead. legacy-area-front-end Legacy: Use area-dart-model instead. labels Feb 9, 2021
@stereotype441 stereotype441 self-assigned this Feb 9, 2021
@scheglov scheglov added the P2 A bug or feature request we're likely to work on label Feb 9, 2021
@stereotype441 stereotype441 added area-fe_analyzer_shared and removed legacy-area-analyzer Use area-devexp instead. legacy-area-front-end Legacy: Use area-dart-model instead. labels Apr 13, 2023
@stereotype441 stereotype441 removed their assignment Apr 13, 2023
@stereotype441 stereotype441 added the type-enhancement A request for a change that isn't a bug label Apr 13, 2023
@stereotype441
Copy link
Member Author

Unassigning myself because I’m not actively working on this feature right now.

@johnniwinther johnniwinther added area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. model-flow Implementation of flow analysis in analyzer/cfe and removed legacy-area-fe-analyzer-shared labels Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. model-flow Implementation of flow analysis in analyzer/cfe P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants