Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downwards inference is pushing down dynamic #27155

Closed
jmesserly opened this issue Aug 25, 2016 · 2 comments
Closed

downwards inference is pushing down dynamic #27155

jmesserly opened this issue Aug 25, 2016 · 2 comments
Assignees
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

Comments

@jmesserly
Copy link

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)

@jmesserly jmesserly added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-strong-mode P2 A bug or feature request we're likely to work on labels Aug 25, 2016
@jmesserly
Copy link
Author

@jmesserly jmesserly self-assigned this Aug 26, 2016
@jmesserly
Copy link
Author

I managed to clean up the bogus "flatten futures" that was happening in FutureUnion as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant