Skip to content

Full implementation of core "why not promoted" algorithm #44898

Open
@stereotype441

Description

@stereotype441

(Parent issue #44897)

a42244f added basic functionality to the CFE and analyzer to show reasons for a promotion failure, but it only addressed two narrow corner cases:

  • Erroneous access to a property due to the target being nullable, where the target is a local variable that was promoted but then later demoted due to a write.
  • Erroneous access to a property due to the target being nullable, where the target is itself a property or field (and hence not promotable).

This logic should be expanded to address all scenarios where promotion might fail.

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/cfe

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions