fixes#27625, Object constraints were not tracked in inference
fixes#27933, pin return type from downwards inference
We now prefer to pick the bound (lower or upper) that had some information on, and it also improves inference error messages somewhat (still a ways to go).
The way this works is we now have a type representing an unknown type: ?. We use ? when performing downward inference steps, instead of `dynamic`. This allows more accurate tracking of type constraints.
For example: given:
var x = await Future.wait([a, b]);
Future.wait<T>'s argument type is Iterable<Future<T>>. Since we didn't know T, we previously pushed down Iterable<Future<dynamic>>. The dynamic caused loss of information. Now we push down Iterable<Future<?>>, allowing us to infer the right type there.
R=leafp@google.com, vsm@google.com
Review-Url: https://codereview.chromium.org/2456803004 .
Our internal tooling is complaining about this when building / checking the ddc sdk. It appears to use the analyzer's summary builder tool which seems less forgiving about dangling references / missing files.
R=srawlins@google.com
Review-Url: https://codereview.chromium.org/2740573003 .
EventStreamSubscription.listen does a cast which is only working in
DDC because we're ignoring the failure. This wraps the listener to
check the argument rather than casting the function. Also picks up a
few misc changes to the main SDK that hadn't been merged into DDC.
BUG=
R=jacobr@google.com
Review-Url: https://codereview.chromium.org/2609633002 .
We're hitting a runtime bug on requestAnimationFrame when we compile
against the latest dart:html in the analyzer (45) but run against the
DDC one (based on 39).
Adding the new type name by hand as a workaround until we roll, but
longer term we'll need to compile and run against the same sdk.
R=alanknight@google.com, leafp@google.com
Review URL: https://codereview.chromium.org/1849133003 .
- Force import order in all sdk files + simplify module builders
- Stub a node_test.sh with hello world + DeltaBlue (to be expanded to language tests in a followup change)
- Use global_ from dart:_runtime in html lib
- Better export for symbols that node chokes upon: throw, const, void, implements, export... (define as throw_ locally, with proper local resolution, then export as throw).
- Cleanup node module builder
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1633003002 .