Files
sdk/pkg/dev_compiler/tool/input_sdk/lib
Jennifer Messerly f021a7019b fixes #27586, prefer downwards context type in generic inference
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 .
2017-03-17 16:59:56 -07:00
..