Closed
Description
I'm not sure if this is a bug or not, but it seems strange to me. The following program will fail to compile:
class Foo {
const Foo();
void resolve() {
print('resolve');
}
}
void main() {
const Foo foo = Foo()..resolve();
}
But final Foo foo = const Foo()..resolve();
is ok, and const Foo foo = const Foo(); foo.resolve();
are both ok. I would expect the compiler to desugar the failing version into the last version there.
Metadata
Metadata
Assignees
Labels
No labels