Front end: Confusing error message with Null typed condition #41384
Labels
improve-diagnostics
Related to the quality of diagnostic messages
legacy-area-front-end
Legacy: Use area-dart-model instead.
Consider the following program:
At commit 28c4c6c (Apr 8), we get the following response from
dart
with null-safety:The type
Null?
seems to arise because its nullability is 'nullable', but the notation is confusing because there is no?
onNull
in any relevant location in the program. The reference to a variable is misleading because there are no variables.A similar error message is emitted if we introduce
Null n = null
and useif (n) {}
.The text was updated successfully, but these errors were encountered: