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

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: Minor clean-ups 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..9b763efce47e064c64ba1487765bc2350ecf2799 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -1422,6 +1422,19 @@ 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',
+ "No constructors could be created for this class, since all the "
+ "constructors in the base class have at least one optional "
+ "parameter.");
Brian Wilkerson 2014/11/07 16:59:32 I find this message to be confusing and think that
Paul Berry 2014/11/07 17:31:01 Good point. I've changed it to "This mixin applic
+
+ /**
* 9 Mixins: It is a compile-time error if a mixin is derived from a class
* whose superclass is not Object.
*

Powered by Google App Engine
This is Rietveld 408576698