Repro:
class C {
int? get foo => null;
}
void f(C c) {
if (c case C(:final foo)) {}
}
Gets refactored into:
class C {
int? foo() => null;
}
void f(C c) {
if (c case C(():final foo)) {}
}
The (): syntax is invalid and an unnecessary change. We should be adding () wherever the local variable is being used instead. I'll take a look at this.
FYI @bwilkerson @srawlins @DanTup