Skip to content

Auto-completion at factory constructors show instance members #59896

@FMorschel

Description

@FMorschel

If you have a code like:

class A {
  A();

  final bool isEmpty = false;

  factory A.a() {
    ^
    return A();
  }
}

At the ^ you ask for auto-completion, it shows isEmpty as an option but it is invalid since we are in a factory constructor. It should be auto-completing the same way as for a static function.


FYI @DanTup @bwilkerson

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work ondevexp-completionIssues with the analysis server's code completion featuredevexp-completion-correctnessIssues with the correctness of the analysis server's code completion featuredevexp-serverIssues related to some aspect of the analysis serverlegacy-area-analyzerUse area-devexp instead.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions