You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CL 345822 (which addresses dart-lang/language#3534) modifies flow analysis so that recognizes when a single pattern is guaranteed to match because its erased type is either the same as, or a supertype of, the erased type of the matched value. This partially addresses a situation where a switch statement is recognized by the exhaustiveness checker as exhaustive, but not by flow analysis.
Such a situation occurs in LanguageFeatures/Extension-types/exhaustiveness_map_A02_t02:
Currently the above code expects an error, because flow analysis cannot tell that the pattern Map() is guaranteed to match the extension type ET1<bool, bool>. After the CL lands, flow analysis will recognize that the Map() pattern is guarnateed to match, so there will be no error.
The text was updated successfully, but these errors were encountered:
CL 345822 (which addresses dart-lang/language#3534) modifies flow analysis so that recognizes when a single pattern is guaranteed to match because its erased type is either the same as, or a supertype of, the erased type of the matched value. This partially addresses a situation where a switch statement is recognized by the exhaustiveness checker as exhaustive, but not by flow analysis.
Such a situation occurs in LanguageFeatures/Extension-types/exhaustiveness_map_A02_t02:
Currently the above code expects an error, because flow analysis cannot tell that the pattern
Map()
is guaranteed to match the extension typeET1<bool, bool>
. After the CL lands, flow analysis will recognize that theMap()
pattern is guarnateed to match, so there will be no error.The text was updated successfully, but these errors were encountered: