Cannot have a const constructor even if members are const-constructible? #819
Labels
enhanced-const
Requests or proposals about enhanced constant expressions
request
Requests to resolve a particular developer problem
state-duplicate
This issue or pull request already exists
We'd like to have code like:
but this fails with:
We could remove
const
from theFooDelegate
constructor, but without itFooDelegate
is no longer perfectly substitutable forFoo
(const foo = FooDelegate(1);
would fail).It would be nice if there were some way for a
const
constructor toconst
-construct members if possible.The text was updated successfully, but these errors were encountered: