Skip to content

Add 'Remove const' fix to const_eval_method_invocation #61450

@FMorschel

Description

@FMorschel

Repro:

class A {
  const A([int _ = 0]);

  int myMethod() => 0;
}

void foo(A a) {
  const _ = A(a.myMethod()); // const_eval_method_invocation
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions