downwards inference is pushing down dynamic #27155
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
Something I've noticed: we push down
dynamic
as a context type in some cases, and this can break some inference because "no context" (null) is treated differently from "dynamic". It would be nice to make the code clean and consistent whatever behavior we choose. IIRC in some code review comments, @leafpetersen suggested we could let InferenceContext.setType handle this by ignoring dynamic.We also push down
dynamic | Future<dynamic>
which has similar problems. That can be fixed by finding the places we create FutureUnions and make sure they don't kick in if we had a dynamic context.related to this comment #27151 (comment)
The text was updated successfully, but these errors were encountered: