Closed
Description
The following code triggers the prefer_const_constructors linter rule on the initial assignment of foo:
///
class Foo {
///
const Foo();
}
///
class Bar {
///
Foo foo = Foo(); // Triggers prefer_const_constructors
///
set changeFoo(Foo newFoo) {
foo = newFoo;
}
}
As I thought new/const was optional and inferred, this appears to be a false positive.