Skip to content

Missing quick-fixes on pattern destructuring #61883

@FMorschel

Description

@FMorschel

Repro:

// other.dart
class A {}

void f(A a) {
  switch (a) {
    case A(value:int other):
      break;
  }
}

// import.dart
import 'other.dart';

extension Ext on A {
  int? get value => null;
}
Image

If the type is declared somewhere else where we can't edit (SDK or a package), then neither the Create field/Create getter fixes show up.

Missing here:

  • Create extension quick-fixes
  • Add import for the extension

FYI @bwilkerson @DanTup

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-quick-fixIssues with analysis server (quick) fixestype-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