Breaking change #63795: Eliminate spurious Null in generator return type

17 views
Skip to first unread message

Erik Ernst

unread,
Aug 6, 2026, 8:59:10 AM (17 hours ago) Aug 6
to anno...@dartlang.org, Kevin Chisholm
Change the inferred return type for a generator function literal such that it no more includes Null in the collection type argument when the end of the body is reachable. This Null is spurious and causes the return type to be less precise than it could otherwise be.

The breaking change request is here: https://github.com/dart-lang/sdk/issues/63795.

Please comment on the issue if you expect this breaking change to pose a problem for you.

  best regards,

--
Erik Ernst  -  Google Danmark ApS
Skt Petri Passage 5, 2 sal, 1165 København K, Denmark
CVR no. 28866984

Reply all
Reply to author
Forward
0 new messages