Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1357)

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart

Issue 2986093002: Revert two Kernel changes that were causing test failures. (Closed)
Patch Set: Revert "Migrate language/async_backwards... ... language/async_star_take..." Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
index 419d9c67ed0a4a1dd8c135a26d6005dda7cd75c4..f8c928d71fca40d3834266ce3e85311abbe1aad9 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
@@ -4,8 +4,6 @@
library fasta.kernel_function_type_alias_builder;
-import 'package:front_end/src/fasta/kernel/kernel_function_type_builder.dart';
-import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart';
import 'package:kernel/ast.dart'
show
DartType,
@@ -13,15 +11,15 @@ import 'package:kernel/ast.dart'
FunctionType,
InvalidType,
TypeParameter,
- Typedef,
- VariableDeclaration;
+ Typedef;
+
import 'package:kernel/type_algebra.dart' show substitute;
import '../fasta_codes.dart' show templateCyclicTypedef;
+
import 'kernel_builder.dart'
show
FunctionTypeAliasBuilder,
- KernelFormalParameterBuilder,
KernelFunctionTypeBuilder,
KernelTypeBuilder,
KernelTypeVariableBuilder,
@@ -63,7 +61,6 @@ class KernelFunctionTypeAliasBuilder
return thisType;
}
thisType = const InvalidType();
-
DartType builtType = type?.build(library) ?? const DynamicType();
if (typeVariables != null) {
for (KernelTypeVariableBuilder tv in typeVariables) {
@@ -71,9 +68,6 @@ class KernelFunctionTypeAliasBuilder
target.typeParameters.add(tv.parameter..parent = target);
}
}
-
- _buildParameters(library);
-
return thisType = builtType;
}
@@ -109,23 +103,4 @@ class KernelFunctionTypeAliasBuilder
}
return buildTypesWithBuiltArguments(library, builtArguments);
}
-
- /// Build and set formal parameters of this typedef.
- void _buildParameters(LibraryBuilder library) {
- int requiredCount = 0;
- final positional = <VariableDeclaration>[];
- final named = <VariableDeclaration>[];
- if (type.formals != null) {
- for (KernelFormalParameterBuilder formal in type.formals) {
- KernelVariableDeclaration parameter = formal.build(library);
- if (formal.isPositional) {
- positional.add(parameter);
- if (formal.isRequired) requiredCount++;
- } else if (formal.isNamed) {
- named.add(parameter);
- }
- }
- target.setParameters(requiredCount, positional, named);
- }
- }
}

Powered by Google App Engine
This is Rietveld 408576698