Index: pkg/compiler/lib/src/resolution/constructors.dart |
diff --git a/pkg/compiler/lib/src/resolution/constructors.dart b/pkg/compiler/lib/src/resolution/constructors.dart |
index 0ea710e2ec2a38dea20f04363dd839baf460ec93..16c2e27fdd51c5c3b91e6abce7bbfea52db9435d 100644 |
--- a/pkg/compiler/lib/src/resolution/constructors.dart |
+++ b/pkg/compiler/lib/src/resolution/constructors.dart |
@@ -146,7 +146,7 @@ class InitializerResolver { |
{bool isSuperCall}) { |
if (isSuperCall) { |
// Calculate correct lookup target and constructor name. |
- if (identical(constructor.enclosingClass, visitor.compiler.objectClass)) { |
+ if (constructor.enclosingClass.isObject) { |
reporter.reportErrorMessage( |
diagnosticNode, MessageKind.SUPER_INITIALIZER_IN_OBJECT); |
isValidAsConstant = false; |
@@ -210,7 +210,7 @@ class InitializerResolver { |
// If the class has a super resolve the implicit super call. |
ClassElement classElement = constructor.enclosingClass; |
ClassElement superClass = classElement.superclass; |
- if (classElement != visitor.compiler.objectClass) { |
+ if (!classElement.isObject) { |
assert(superClass != null); |
assert(superClass.isResolved); |