Files
sdk/pkg/vm
Martin Kustermann e40980cb3d [tfa] Fix bug in TFA transformation of unused fields
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>
2025-04-01 04:22:37 -07:00
..

This package hosts VM specific Dart code and helper scripts.