Skip to content

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

Open
@stereotype441

Description

@stereotype441

(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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.model-flowImplementation of flow analysis in analyzer/cfetype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions