OLD | NEW |
1 ## 1.20.0 | 1 ## 1.20.0 |
2 | 2 |
3 ### Dart VM | 3 ### Dart VM |
4 | 4 |
5 * We have improved the way that the VM locates the native code library for a | 5 * We have improved the way that the VM locates the native code library for a |
6 native extension (e.g. `dart-ext:` import). We have updated this | 6 native extension (e.g. `dart-ext:` import). We have updated this |
7 [article on native extensions](https://www.dartlang.org/articles/dart-vm/nativ
e-extensions) | 7 [article on native extensions](https://www.dartlang.org/articles/dart-vm/nativ
e-extensions) |
8 to reflect the VM's improved behavior. | 8 to reflect the VM's improved behavior. |
9 | 9 |
10 ### Core library changes | 10 ### Core library changes |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // this override is legal, it will check at runtime if we actually | 51 // this override is legal, it will check at runtime if we actually |
52 // got a MyView. | 52 // got a MyView. |
53 addChild(@checked MyView v) {} | 53 addChild(@checked MyView v) {} |
54 } | 54 } |
55 main() { | 55 main() { |
56 dynamic mv = new MyView(); | 56 dynamic mv = new MyView(); |
57 mv.addChild(new View()); // runtime error | 57 mv.addChild(new View()); // runtime error |
58 } | 58 } |
59 ``` | 59 ``` |
60 | 60 |
| 61 * Breaking change - infer list and map literals from the context type as well as |
| 62 their values, consistent with generic methods and instance creation |
| 63 (SDK issue [27151](https://github.com/dart-lang/sdk/issues/27151)). |
| 64 |
| 65 ```dart |
| 66 import 'dart:async'; |
| 67 main() async { |
| 68 var b = new Future<B>.value(new B()); |
| 69 var c = new Future<C>.value(new C()); |
| 70 var/*infer List<Future<A>>*/ list = [b, c]; |
| 71 var/*infer List<A>*/ result = await Future.wait(list); |
| 72 } |
| 73 class A {} |
| 74 class B extends A {} |
| 75 class C extends A {} |
| 76 ``` |
| 77 |
61 ## 1.19.0 | 78 ## 1.19.0 |
62 | 79 |
63 ### Language changes | 80 ### Language changes |
64 | 81 |
65 * The language now allows a trailing comma after the last argument of a call and | 82 * The language now allows a trailing comma after the last argument of a call and |
66 the last parameter of a function declaration. This can make long argument or | 83 the last parameter of a function declaration. This can make long argument or |
67 parameter lists easier to maintain, as commas can be left as-is when | 84 parameter lists easier to maintain, as commas can be left as-is when |
68 reordering lines. For details, see SDK issue | 85 reordering lines. For details, see SDK issue |
69 [26644](https://github.com/dart-lang/sdk/issues/26644). | 86 [26644](https://github.com/dart-lang/sdk/issues/26644). |
70 | 87 |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 they will keep the Dart process alive until they time out. This fixes the | 1273 they will keep the Dart process alive until they time out. This fixes the |
1257 handling of persistent connections. Previously, the client would shut down | 1274 handling of persistent connections. Previously, the client would shut down |
1258 immediately after a request. | 1275 immediately after a request. |
1259 | 1276 |
1260 * **Breaking change:** `HttpServer` no longer compresses all traffic by | 1277 * **Breaking change:** `HttpServer` no longer compresses all traffic by |
1261 default. The new `autoCompress` property can be set to `true` to re-enable | 1278 default. The new `autoCompress` property can be set to `true` to re-enable |
1262 compression. | 1279 compression. |
1263 | 1280 |
1264 * `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument, | 1281 * `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument, |
1265 which controls how it resolves `package:` URIs. | 1282 which controls how it resolves `package:` URIs. |
OLD | NEW |