Breaking change 49635: Flag additional code as unreachable due to types Null and Never

74 views
Skip to first unread message

Paul Berry

unread,
Aug 10, 2022, 1:20:46 PM8/10/22
to anno...@dartlang.org
We're planning to make a minor change to flow analysis that will result in more accurate detection of unreachable code.  This will simplify the flow analysis logic in a way that should help with the implementation of field promotion.

The only code which will be affected is code that is genuinely unreachable, and in most circumstances the only effect will be an "unreachable code" warning, which the user may ignore.  In some very unlikely scenarios, type inference could be affected, in which case users might have to add an explicit type to their code to preserve existing behaviour.

See https://github.com/dart-lang/sdk/issues/49635 for more information and comment there if you have any concerns.

Paul Berry

unread,
Aug 22, 2022, 1:23:07 PM8/22/22
to anno...@dartlang.org
Reply all
Reply to author
Forward
0 new messages