Chromium Code Reviews| 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 930a113e1fb2f1e01d557ed72814146d03e864e7..effd38cac3cdb516e5115fc22f3da00f9eae06a9 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
| @@ -3188,17 +3188,18 @@ class ClassResolverVisitor extends TypeDefinitionVisitor { |
| element.supertype = resolveSupertype(element, node.superclass); |
| } |
| } |
| - |
| // If the super type isn't specified, we make it Object. |
|
karlklose
2013/04/24 14:27:28
Please update the comment.
sra1
2013/04/24 17:32:43
Done.
|
| - final objectElement = compiler.objectClass; |
| - if (!identical(element, objectElement) && element.supertype == null) { |
| - if (objectElement == null) { |
| - compiler.internalError("Internal error: cannot resolve Object", |
| - node: node); |
| - } else { |
| - objectElement.ensureResolved(compiler); |
| + if (element.supertype == null && element != compiler.objectClass) { |
|
ngeoffray
2013/04/24 06:58:13
This code looks kind of convoluted. I'd prefer hav
sra1
2013/04/24 17:32:43
Since this is the resolver we should use the backe
|
| + final superElement = compiler.backend.defaultSuperclass(element); |
|
ngeoffray
2013/04/24 06:58:13
final -> ClassElement
sra1
2013/04/24 17:32:43
Done.
|
| + if (element != superElement) { // I.e. don't make Object extend Object. |
|
ngeoffray
2013/04/24 06:58:13
You already made that test (don't make Object exte
sra1
2013/04/24 17:32:43
Not quite true. I'll clarify the comment. We dont
|
| + if (superElement == null) { |
| + compiler.internalError("Internal error: cannot resolve Object", |
| + node: node); |
| + } else { |
| + superElement.ensureResolved(compiler); |
| + } |
| + element.supertype = superElement.computeType(compiler); |
| } |
| - element.supertype = objectElement.computeType(compiler); |
| } |
| assert(element.interfaces == null); |