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

Unified Diff: sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart

Issue 11412245: MalformedType used for all invalid type annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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: sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
index a5ee505b4d90cce3f327f8730186ff0567fd1640..8a68eb5ffbb95576648deef10a8d4a018c49081c 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
@@ -75,8 +75,11 @@ Dart2JsTypeMirror _convertTypeToTypeMirror(
return new Dart2JsVoidMirror(system, type);
} else if (type is TypedefType) {
return new Dart2JsTypedefMirror(system, type);
+ } else if (type is MalformedType) {
+ // TODO(johnniwinther): We need a mirror on malformed types.
+ return system.dynamicType;
}
- throw new ArgumentError("Unexpected interface type $type");
+ throw new ArgumentError("Unexpected type $type of kind ${type.kind}");
}
Collection<Dart2JsMemberMirror> _convertElementMemberToMemberMirrors(

Powered by Google App Engine
This is Rietveld 408576698