Open
Description
The analyzer fails to report duplicate getters on
class A {
void set b(int? value) {}
int? get b => null;
int? get b => 0;
}
If the order of the declarations is changed to
class A {
int? get b => null;
void set b(int? value) {}
int? get b => 0;
}
the error is reported:
error • getter.dart:4:11 • The name 'b' is already defined. Try renaming one of the declarations. • duplicate_definition
- The first definition of this name at getter.dart:2:11.