CFE fails to account for null when checking whether a switch statement as exhaustive #43348
Labels
legacy-area-front-end
Legacy: Use area-dart-model instead.
NNBD
Issues related to NNBD Release
soundness
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
The following program is accepted by the CFE:
It should be rejected, since the
switch
statement is non-exhaustive (it doesn't handlenull
), and thereforenull
might be returned fromf
, in violation of its static type. This is a soundness issue.The text was updated successfully, but these errors were encountered: