Why does strict-raw-types
not apply to is
or as
?
#60282
Labels
area-devexp
Developer experience items (DevTools, IDEs, analysis server, completions, refactorings, ...).
Assuming
analysis_options.yaml
:Consider the following piece of code:
There is no warning for
o is Generic
even thoughGeneric
is in fact a raw type. I realize that this behavior is to spec, since the spec makes a specific exemption foris
andas
. But the exemption seems counter to the goal of the feature. If you actually want to promoteo
toGeneric<dynamic>
you can always write that explicitlyif (o is Generic<dynamic>)
.The text was updated successfully, but these errors were encountered: