| OLD | NEW |
| 1 ## 1.24.0 | 1 ## 1.24.0 |
| 2 | 2 |
| 3 ### Language | 3 ### Language |
| 4 * During a dynamic type check, `void` is not required to be `null` anymore. | 4 * During a dynamic type check, `void` is not required to be `null` anymore. |
| 5 In practice, this makes overriding `void` functions with non-`void` functions | 5 In practice, this makes overriding `void` functions with non-`void` functions |
| 6 safer. | 6 safer. |
| 7 * During static analysis, a function declared using `=>` with return type `void` |
| 8 now allows the returned expression to have any type. For example, assuming the |
| 9 declaration `int x;`, it is now type correct to have `void f() => ++x;`. |
| 7 | 10 |
| 8 #### Strong Mode | 11 #### Strong Mode |
| 9 | 12 |
| 10 * Removed ad hoc Future.then inference in favor of using FutureOr. Prior to | 13 * Removed ad hoc Future.then inference in favor of using FutureOr. Prior to |
| 11 adding FutureOr to the language, the analyzer implented an ad hoc type inference | 14 adding FutureOr to the language, the analyzer implented an ad hoc type inference |
| 12 for Future.then (and overrides) treating it as if the onValue callback was typed | 15 for Future.then (and overrides) treating it as if the onValue callback was typed |
| 13 to return FutureOr for the purposes of inference. This ad hoc inference has | 16 to return FutureOr for the purposes of inference. This ad hoc inference has |
| 14 been removed now that FutureOr has been added. | 17 been removed now that FutureOr has been added. |
| 15 | 18 |
| 16 Packages that implement `Future` must either type the `onValue` parameter to | 19 Packages that implement `Future` must either type the `onValue` parameter to |
| 17 `.then` as returning `FutureOr<T>`, or else must leave the type of the parameter | 20 `.then` as returning `FutureOr<T>`, or else must leave the type of the parameter |
| 18 entirely to allow inference to fill in the type. | 21 entirely to allow inference to fill in the type. |
| 19 | 22 |
| 23 * The following is also a change in strong mode: During static analysis, a |
| 24 function declared using `=>` with return type `void` now allows the returned |
| 25 expression to have any type. |
| 20 | 26 |
| 21 ### Core library changes | 27 ### Core library changes |
| 22 | 28 |
| 23 * `dart:io` | 29 * `dart:io` |
| 24 * Added `Platform.localeName`, needed for accessing the locale on platforms | 30 * Added `Platform.localeName`, needed for accessing the locale on platforms |
| 25 that don't store it in an environment variable. | 31 that don't store it in an environment variable. |
| 26 * Added `ProcessInfo.currentRss` and `ProcessInfo.maxRss` for inspecting | 32 * Added `ProcessInfo.currentRss` and `ProcessInfo.maxRss` for inspecting |
| 27 the Dart VM process current and peak resident set size. | 33 the Dart VM process current and peak resident set size. |
| 28 * Added 'RawSynchronousSocket', a basic synchronous socket implementation. | 34 * Added 'RawSynchronousSocket', a basic synchronous socket implementation. |
| 29 * `dart:convert` | 35 * `dart:convert` |
| (...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1905 they will keep the Dart process alive until they time out. This fixes the | 1911 they will keep the Dart process alive until they time out. This fixes the |
| 1906 handling of persistent connections. Previously, the client would shut down | 1912 handling of persistent connections. Previously, the client would shut down |
| 1907 immediately after a request. | 1913 immediately after a request. |
| 1908 | 1914 |
| 1909 * **Breaking change:** `HttpServer` no longer compresses all traffic by | 1915 * **Breaking change:** `HttpServer` no longer compresses all traffic by |
| 1910 default. The new `autoCompress` property can be set to `true` to re-enable | 1916 default. The new `autoCompress` property can be set to `true` to re-enable |
| 1911 compression. | 1917 compression. |
| 1912 | 1918 |
| 1913 * `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument, | 1919 * `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument, |
| 1914 which controls how it resolves `package:` URIs. | 1920 which controls how it resolves `package:` URIs. |
| OLD | NEW |