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

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

Issue 1436433002: Issue 24751. Report a compile time error when @static_field is used with arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 e29c5dca573cbbed2cb0687211b258268c331e87..b3fa4f3c0217fe700b0f1aac19faf51de482503c 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -597,6 +597,26 @@ class CompileTimeErrorCode extends ErrorCode {
"The name '{0}' is defined in the libraries '{1}' and '{2}'");
/**
+ * 15 Metadata: The constant expression given in an annotation is type checked
+ * and evaluated in the scope surrounding the declaration being annotated.
+ *
+ * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class
+ * accessible in the current scope, optionally followed by type arguments.
+ *
+ * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>,
+ * &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;
+ * x<sub>n+k</sub>: a<sub>n+k</sub>)</i> it is a compile-time error if
+ * <i>T</i> is not a class accessible in the current scope, optionally
+ * followed by type arguments.
+ *
+ * Parameters:
+ * 0: the name of the non-type element
+ */
+ static const CompileTimeErrorCode ANNOTATION_WITH_NON_CLASS =
+ const CompileTimeErrorCode(
+ 'ANNOTATION_WITH_NON_CLASS', "The name '{0}' is not a class");
+
+ /**
* 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
* not denote a formal parameter.
*
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | pkg/analyzer/test/generated/compile_time_error_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698