Replace using deprecated CompilationUnit.types with classes.
Change-Id: Ieb95799a0e0afa8d1d2da01e6050d675a2cb92e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235402
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/runtime/tools/dartfuzz/gen_api_table.dart b/runtime/tools/dartfuzz/gen_api_table.dart
index 2eb9f52..784dfcb 100644
--- a/runtime/tools/dartfuzz/gen_api_table.dart
+++ b/runtime/tools/dartfuzz/gen_api_table.dart
@@ -382,7 +382,7 @@
protoString(null, function.parameters));
}
}
- for (var classElement in unit.types) {
+ for (var classElement in unit.classes) {
if (classElement.isPublic) {
visitClass(classElement);
}
diff --git a/runtime/tools/dartfuzz/gen_type_table.dart b/runtime/tools/dartfuzz/gen_type_table.dart
index a8e0868..da29e56 100644
--- a/runtime/tools/dartfuzz/gen_type_table.dart
+++ b/runtime/tools/dartfuzz/gen_type_table.dart
@@ -1364,7 +1364,7 @@
// classes. Note that `types` only returns classes. You can use
// `mixins` to visit mixins, `enums` to visit enum, `functionTypeAliases`
// to visit typedefs, etc.
- for (var classElement in unit.types) {
+ for (var classElement in unit.classes) {
if (classElement.isPublic) {
// Hack: Filter out some difficult types, abstract types and types that
// have methods with abstract type parameters.