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

Unified Diff: sdk/lib/_internal/compiler/implementation/typechecker.dart

Issue 268363017: Treat malformed bound as dynamic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « no previous file | tests/language/malformed_bound_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/typechecker.dart
diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart
index f11266884cce4c87f7b69558ea5c7a7f0e9c0d96..da206209d409141d209c159a20b61f64976dbb2f 100644
--- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
+++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
@@ -659,6 +659,9 @@ class TypeCheckerVisitor extends Visitor<DartType> {
type = compiler.objectClass.rawType;
}
}
+ if (type.kind == TypeKind.MALFORMED_TYPE) {
+ return types.dynamicType;
+ }
return type.unalias(compiler);
}
@@ -686,6 +689,9 @@ class TypeCheckerVisitor extends Visitor<DartType> {
// 'call' method into account.
ElementAccess getAccess(Name name,
DartType unaliasedBound, InterfaceType interface) {
+ if (interface.treatAsDynamic) {
+ return new DynamicAccess();
+ }
MemberSignature member = lookupMemberSignature(memberName, interface);
if (member != null) {
return new MemberAccess(member);
« no previous file with comments | « no previous file | tests/language/malformed_bound_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698