Index: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
index 71f2b30b67e10b0059b217923d1396d2fcd81623..b9bb94889534f760cbcfd36c387d8c6dae59b4f2 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
@@ -1952,41 +1952,6 @@ class KernelTypeInferrer extends TypeInferrerImpl { |
// everything, this case should no longer be needed. |
} |
} |
- |
- /// If the given [type] is a [TypeParameterType], resolve it to its bound. |
- DartType resolveTypeParameter(DartType type) { |
- DartType resolveOneStep(DartType type) { |
- if (type is TypeParameterType) { |
- return type.bound; |
- } else { |
- return null; |
- } |
- } |
- |
- var resolved = resolveOneStep(type); |
- if (resolved == null) return type; |
- |
- // Detect circularities using the tortoise-and-hare algorithm. |
- type = resolved; |
- DartType hare = resolveOneStep(type); |
- if (hare == null) return type; |
- while (true) { |
- if (identical(type, hare)) { |
- // We found a circularity. Give up and return `dynamic`. |
- return const DynamicType(); |
- } |
- |
- // Hare takes two steps |
- var step1 = resolveOneStep(hare); |
- if (step1 == null) return hare; |
- var step2 = resolveOneStep(step1); |
- if (step2 == null) return hare; |
- hare = step2; |
- |
- // Tortoise takes one step |
- type = resolveOneStep(type); |
- } |
- } |
} |
/// Shadow object for [TypeLiteral]. |