1777f769ab
If tree shaker doesn't visit TypeParameterType.promotedBound which contains the only reference to a particular class it may remove that class, leaving a dangling reference from promotedBound. After that kernel AST serialization would crash with "Missing canonical name for Reference" error. This change also fixes TypeParameterType.visitChildren. TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_47878.dart Fixes https://github.com/dart-lang/sdk/issues/47878 Change-Id: I555261713240bf0be412db27efb68f32cfd8008b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222781 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>