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

Unified Diff: pkg/compiler/lib/src/resolution/typedefs.dart

Issue 2136663002: fix handling of malformed typedefs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « pkg/compiler/lib/src/dart_types.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/typedefs.dart
diff --git a/pkg/compiler/lib/src/resolution/typedefs.dart b/pkg/compiler/lib/src/resolution/typedefs.dart
index cee72df5c7f297ebe16da6290cdad19a0ccac04f..daf25dc79bea870713c7fa75cfdae1ff70f05986 100644
--- a/pkg/compiler/lib/src/resolution/typedefs.dart
+++ b/pkg/compiler/lib/src/resolution/typedefs.dart
@@ -4,6 +4,8 @@
library dart2js.resolution.typedefs;
+import 'dart:developer';
+
import '../common.dart';
import '../compiler.dart' show Compiler;
import '../dart_types.dart';
@@ -67,7 +69,7 @@ class TypedefCyclicVisitor extends BaseDartTypeVisitor {
Link<TypeVariableElement> seenTypeVariables =
const Link<TypeVariableElement>();
- TypedefCyclicVisitor(this.reporter, TypedefElement this.element);
+ TypedefCyclicVisitor(this.reporter, this.element);
visitType(DartType type, _) {
// Do nothing.
@@ -115,7 +117,9 @@ class TypedefCyclicVisitor extends BaseDartTypeVisitor {
seenTypedefs = seenTypedefs.prepend(typedefElement);
seenTypedefsCount++;
type.visitChildren(this, null);
- typedefElement.aliasCache.accept(this, null);
+ if (!typedefElement.isMalformed) {
+ typedefElement.aliasCache.accept(this, null);
+ }
seenTypedefs = seenTypedefs.tail;
seenTypedefsCount--;
}
« no previous file with comments | « pkg/compiler/lib/src/dart_types.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698