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

Unified Diff: pkg/analyzer/lib/src/error/codes.dart

Issue 2639883005: Add parser support for covariant parameters (Closed)
Patch Set: Created 3 years, 11 months 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/error/codes.dart
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 41cf63aa61cd6a61e5884e0dd61f60feb00ca712..7787e0ad3910985458469a9605b4fa2f8557f01e 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -1457,6 +1457,16 @@ class CompileTimeErrorCode extends ErrorCode {
"Try replacing the type parameter with a different type.");
/**
+ * The 'covariant' keyword was found in an inappropriate location.
+ */
+ static const CompileTimeErrorCode INVALID_USE_OF_COVARIANT =
+ const CompileTimeErrorCode(
+ 'INVALID_USE_OF_COVARIANT',
+ "The 'covariant' keyword can only be used for parameters in instance "
+ "methods or before non-final instance fields.",
+ "Try removing the 'covariant' keyword.");
+
+ /**
* 14.2 Exports: It is a compile-time error if the compilation unit found at
* the specified URI is not a library declaration.
*
« no previous file with comments | « pkg/analyzer/lib/src/dart/error/syntactic_errors.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