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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 141823002: Use Object as supertype in face of invalid supertypes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment. Created 6 years, 11 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/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index a7250ac632e788d2b17d518d1f8fdbc6b6ae8cea..cdc8e8602671b07e05f0aaae3de483cda746549c 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -3661,6 +3661,8 @@ class TypeDefinitionVisitor extends MappingVisitor<DartType> {
scope = Scope.buildEnclosingScope(element),
super(compiler, mapping);
+ DartType get objectType => compiler.objectClass.rawType;
+
void resolveTypeVariableBounds(NodeList node) {
if (node == null) return;
@@ -3706,7 +3708,7 @@ class TypeDefinitionVisitor extends MappingVisitor<DartType> {
}
addDeferredAction(element, checkTypeVariableBound);
} else {
- variableElement.bound = compiler.objectClass.computeType(compiler);
+ variableElement.bound = objectType;
}
nodeLink = nodeLink.tail;
typeLink = typeLink.tail;
@@ -4120,15 +4122,15 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
if (supertype != null) {
if (identical(supertype.kind, TypeKind.MALFORMED_TYPE)) {
compiler.reportError(superclass, MessageKind.CANNOT_EXTEND_MALFORMED);
- return null;
+ return objectType;
} else if (!identical(supertype.kind, TypeKind.INTERFACE)) {
compiler.reportError(superclass.typeName,
MessageKind.CLASS_NAME_EXPECTED);
- return null;
+ return objectType;
} else if (isBlackListed(supertype)) {
compiler.reportError(superclass, MessageKind.CANNOT_EXTEND,
{'type': supertype});
- return null;
+ return objectType;
}
}
return supertype;
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698