[kernel] Treat TypeParameter.defaultType as a child in visit methods

Change-Id: Id2bc2ec8f4d08ca3ef0c428efa2dbf369039b59c
Reviewed-on: https://dart-review.googlesource.com/55883
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
This commit is contained in:
Dmitry Stefantsov 2018-05-22 13:14:16 +00:00 committed by commit-bot@chromium.org
parent 330dcb19da
commit 08d466bfad

View file

@ -5011,7 +5011,7 @@ class TypeParameter extends TreeNode {
/// argument of a dynamic invocation of a generic function.
DartType defaultType;
TypeParameter([this.name, this.bound]);
TypeParameter([this.name, this.bound, this.defaultType]);
// Must match serialized bit positions.
static const int FlagGenericCovariantImpl = 1 << 0;
@ -5041,10 +5041,14 @@ class TypeParameter extends TreeNode {
visitChildren(Visitor v) {
bound.accept(v);
defaultType?.accept(v);
}
transformChildren(Transformer v) {
bound = v.visitDartType(bound);
if (defaultType != null) {
defaultType = v.visitDartType(defaultType);
}
}
/// Returns a possibly synthesized name for this type parameter, consistent