7ff5e3654d
Initializers of late local variables are wrapped into closures. The result type of a closure is a static type of the variable. So initializer of a late variable with static type Never have a call to a closure with static result type Never. TFA summary collector handles calls with static result type Never specially, treating all subsequent code as unreachable (by setting control-dependent condition to empty). As a result, all subsequent code after late variable with static type Never (and initializer) is tree-shaken. The fix is to avoid propagating control-dependent condition out of the late variable initializers. TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_63478.dart Fixes https://github.com/dart-lang/sdk/issues/63478 Change-Id: If41221777c9d249dd21ce5827c586b0f531cbce8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508363 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>