-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
legacy-area-front-endLegacy: Use area-dart-model instead.Legacy: Use area-dart-model instead.
Description
Thanks to @fishythefish for noting this. Consider the following program:
typedef T = int? Function();
const t = T;
void main() {
print(T);
print(t);
}
This prints () => int?
and () => int
with dart --enable-experiment=non-nullable --no-null-safety
from c800b8d.
However, https://github.com/dart-lang/language/blob/master/accepted/future-releases/nnbd/feature-specification.md#const-evaluation-and-canonicalization only specifies that type arguments passed to collection literals and constant object expressions should be turned into legacy types in weak checking mode, but the above doesn't include any type arguments, and there does not seem to be a rule that turns function types into legacy types for constant expressions.
Metadata
Metadata
Assignees
Labels
legacy-area-front-endLegacy: Use area-dart-model instead.Legacy: Use area-dart-model instead.