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

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

Issue 2656303004: Add a temporary analyzer error to work around #28515 (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 9b4b73df12512150a33610531e7dcdac49744eb9..6c7fb02faabb45cb48b31385de51ad111c19b61a 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -1048,6 +1048,22 @@ class CompileTimeErrorCode extends ErrorCode {
"Try using a normal parameter.");
/**
+ * Temporary error to work around dartbug.com/28515.
+ *
+ * We cannot yet properly summarize function-typed parameters with generic
+ * arguments, so to prevent confusion, we produce an error for any such
+ * constructs (regardless of whether summaries are in use).
+ *
+ * TODO(paulberry): remove this once dartbug.com/28515 is fixed.
+ */
+ static const GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED =
+ const CompileTimeErrorCode(
+ 'GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED',
+ "Analysis of generic function typed parameters is not yet supported.",
+ "Try using an explicit typedef, or changing type parameters to "
+ "`dynamic`.");
+
+ /**
* 7.2 Getters: It is a compile-time error if a class has both a getter and a
* method with the same name.
*

Powered by Google App Engine
This is Rietveld 408576698