class Foo<T> {
Foo.named();
}
void main() {
Foo.named<String>(); // No error in analyzer or CFE
new Foo.named<String>(); // Error in analyzer only
}
Dart 1 VM did not accept the second form.
It would be breaking to make the first form an error since it has no error in either place. The inconsistency between including or not including new is jarring.
Dart 1 VM did not accept the second form.
It would be breaking to make the first form an error since it has no error in either place. The inconsistency between including or not including
newis jarring.