3095c4542c
This change adds logic to compute whether a pattern is refutable or irrefutable, and reports the error `` if a refutable pattern is used in an irrefutable context. Additionally, the methods `handleConstOrLiteralPattern` and `handleVariablePattern` are adjusted so that they report the static type of the matcher back to the client. A lot of internal type analysis logic previously referred to the static type of a pattern as its "inferred type"; this nomenclature is corrected to match the spec. Change-Id: Icaa1118d1da41b28bea2b4f14c47578dacd85807 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256641 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>