It is an error if a mixin declaration or a class declaration with no generative constructors declares an instance variable with a potentially non-nullable type and no initializer expression unless the variable is marked with the late modifier.
But the following test fails
void foo() {}
class C {
Function f;
factory C.f() = D;
// ^^^
// [analyzer] unspecified
// [cfe] unspecified
}
class D implements C {
Function f = foo;
D();
}
main() {
new C.f();
}
There is no expected error in dartanalyzer version 2.8.0-dev.9.0
Expected result: class C declares non-initialized instance variable and has no generative constructor therefore there must be an error
According to the NNBD specification
But the following test fails
There is no expected error in dartanalyzer version 2.8.0-dev.9.0
Expected result: class C declares non-initialized instance variable and has no generative constructor therefore there must be an error