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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 707073002: Fix analyzer's treatment of mixin constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve error message. Created 6 years, 1 month 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 | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | pkg/analyzer/test/generated/all_the_rest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 7d9268530f8484c113dcf2bceee102c32378f5df..b4a3d987219dfe364f11fc6439bd6739b163b0ab 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -5756,10 +5756,15 @@ class ImplicitConstructorBuilder extends ScopedVisitor {
List<ConstructorElement> implicitConstructors = new List<ConstructorElement>();
for (int i = 0; i < count; i++) {
ConstructorElement explicitConstructor = constructors[i];
- if (!explicitConstructor.isFactory) {
+ if (!explicitConstructor.isFactory &&
+ classElement.isSuperConstructorAccessible(explicitConstructor)) {
implicitConstructors.add(_createImplicitContructor(classType, explicitConstructor, parameterTypes, argumentTypes));
}
}
+ if (implicitConstructors.isEmpty) {
+ reportErrorForNode(CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS,
+ node, [superclassElement.name]);
+ }
classElement.constructors = implicitConstructors;
}
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | pkg/analyzer/test/generated/all_the_rest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698