600f8a9601
This issue was partially fixed by: https://dart-review.googlesource.com/c/sdk/+/428541 However, this only looked at the case of a member in an abstract class that itself was made abstract if it was unused. TFA does not make the member abstract if the enclosing class is not abstract: pkg/vm/lib/transformations/type_flow/transformer.dart#L2289 Instead we can use the unreachable metadata to identify these unreachable body members (that have default values cleared): pkg/vm/lib/transformations/type_flow/transformer.dart#L736 Attached test fails prior to this fix. Bug: https://github.com/dart-lang/sdk/issues/62273 Change-Id: I1ccb818ec41bbe805ee828be0b96ba23e73beae4 Tested: Introduced unit test. Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/469280 Reviewed-by: Alexander Markov <alexmarkov@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>