Index: pkg/analyzer/lib/src/generated/element_resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart |
index ab9365e3c52393de64e19b7912e08ab43d9b2e57..6b6acec33a6680dc6acc58cde641377fa8d954c0 100644 |
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart |
@@ -1061,7 +1061,8 @@ class ElementResolver extends SimpleAstVisitor<Object> { |
SimpleIdentifier name = node.constructorName; |
String superName = name != null ? name.name : null; |
ConstructorElement element = superType.lookUpConstructor(superName, _definingLibrary); |
- if (element == null) { |
+ if (element == null || |
+ !enclosingClass.isSuperConstructorAccessible(element)) { |
if (name != null) { |
_resolver.reportErrorForNode(CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, node, [superType.displayName, name]); |
} else { |