e40980cb3d
When a TFA eliminates a field it moves it's initializer to a `LocalInitializer` of the constructor. After [0] the `VariableDeclaration` of the local initializer will get the type of the field. Though that CL didn't ensure TFA also visits the type of the `VariableDeclaration`. This can lead to a situation where the type refers to a class that TFA has tree shaken, which causes dangling references in the AST. [0] https://dart-review.googlesource.com/c/sdk/+/415201 Issue https://github.com/flutter/flutter/issues/166124 Issue b/406692736 TEST=pkg/vm/testcases/transformations/type_flow/transformer/write_only_field Change-Id: Ieb8f5c4daedd314c613617218da898059bb6941a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419542 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>