Skip to content

Commit 9820535

Browse files
committed
Announced #28939 (void f() => e allows an e of any type) in changelog
Addresses sdk issue #29646. [email protected] Review-Url: https://codereview.chromium.org/2887253003 .
1 parent 25a770f commit 9820535

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* During a dynamic type check, `void` is not required to be `null` anymore.
55
In practice, this makes overriding `void` functions with non-`void` functions
66
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;`.
710

811
#### Strong Mode
912

@@ -17,6 +20,9 @@ Packages that implement `Future` must either type the `onValue` parameter to
1720
`.then` as returning `FutureOr<T>`, or else must leave the type of the parameter
1821
entirely to allow inference to fill in the type.
1922

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.
2026

2127
### Core library changes
2228

0 commit comments

Comments
 (0)