sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[analyzer] No error if user-defined operator declares required named parameter

Open sgrekhov opened this issue 2 years ago • 1 comments

Analyzer doesn't report the following error (CFE does)

class C {
  int operator *({required int other}) => 42;
//                ^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

main() {
  C() * 1;
}

Tested on the edge SDK (Aug 24, 2023) on Linux x64

sgrekhov avatar Aug 24 '23 09:08 sgrekhov