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

Unified Diff: pkg/analyzer/lib/src/generated/error.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
Index: pkg/analyzer/lib/src/generated/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index f88d40a76327ad9f8e6c7148b0c0d4d6496d7c03..89b7e2115f086412253484fa02c20373cc94e477 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -1422,6 +1422,18 @@ class CompileTimeErrorCode extends ErrorCode {
static const CompileTimeErrorCode MIXIN_DEFERRED_CLASS = const CompileTimeErrorCode('MIXIN_DEFERRED_CLASS', "This class cannot mixin the deferred class '{0}'");
/**
+ * Not yet in the spec, but consistent with VM behavior. It is a
+ * compile-time error if all of the constructors of a mixin's base class have
+ * at least one optional parameter (since only constructors that lack
+ * optional parameters can be forwarded to the mixin). See
+ * https://code.google.com/p/dart/issues/detail?id=15101#c4
+ */
+ static const CompileTimeErrorCode MIXIN_HAS_NO_CONSTRUCTORS =
+ const CompileTimeErrorCode('MIXIN_HAS_NO_CONSTRUCTORS',
+ "This mixin application is invalid because all of the constructors "
+ "in the base class '{0}' have optional parameters.");
+
+ /**
* 9 Mixins: It is a compile-time error if a mixin is derived from a class
* whose superclass is not Object.
*
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698