Skip to content

Getter completion on pattern destructing when specifying types is incorrect #61792

@FMorschel

Description

@FMorschel

After #59854, using the completion after the :s here, with always_specify_types, I was expecting:

abstract class A {
  bool get isEmpty;
}

class B {
  final bool isEmpty;
  B(this.isEmpty);
}

void foo(Object o) {
  if (o case A(:bool isEmpty) || B(:bool isEmpty)) { // Try both locations
    isEmpty;
  }
}

But the first case, being a "method" currently completes after the : as bool Function() isEmpty.

CC @DanTup

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-completionIssues with the analysis server's code completion featuretype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions