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

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

Issue 3006893002: Refactor fuzzy arrow hints. (Closed)
Patch Set: Reland and refactor fuzzy arrow hints. Created 3 years, 4 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
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/lib/src/task/strong/checker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/error/hint_codes.dart
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index 48de43d59a0a561da7b876a695dd451e504d1d57..63067a879b6eaff610c341ba79a01bb167b276ca 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -37,6 +37,18 @@ class HintCode extends ErrorCode {
'ARGUMENT_TYPE_NOT_ASSIGNABLE',
"The argument type '{0}' can't be assigned to the parameter type '{1}'.");
+ /**
+ * This hint is generated when a function type is assigned to a function
+ * typed location, and the assignment will be invalid after fuzzy arrows
+ * (the treatment of dynamic as bottom in certain locations) is removed.
+ *
+ */
+ static const HintCode USES_DYNAMIC_AS_BOTTOM = const HintCode(
+ 'USES_DYNAMIC_AS_BOTTOM',
+ "A function of type '{0}' can't be assigned to a variable of type '{1}'.",
+ "Try changing the type of the function, or "
+ "casting the right-hand type to '{1}'.");
+
/**
* When the target expression uses '?.' operator, it can be `null`, so all the
* subsequent invocations should also use '?.' operator.
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/lib/src/task/strong/checker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698