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

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

Issue 1422813003: Add hint for use of ?. in conditions (issue 24649) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add checks for asserts, and conditional expressions Created 5 years, 2 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 | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 af45572c7bba909c839ffd665d84963d9bba4654..66a58bcee827592e16615d3487dc8acdd0b690d1 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -3023,6 +3023,15 @@ class HintCode extends ErrorCode {
"Either add a return statement or change the return type to 'void'");
/**
+ * Generate a hint for conditions in control flow statements that uses the
pquitslund 2015/10/28 04:40:35 uses => use?
Brian Wilkerson 2015/10/28 15:27:38 Actually, it needed a bigger re-write than that. B
+ * null-aware '?.' operator.
+ */
+ static const HintCode NULL_AWARE_IN_CONDITION = const HintCode(
+ 'NULL_AWARE_IN_CONDITION',
+ "The value of the '?.' operator can be 'null', which is not appropriate in a condition",
+ "Replace the '?.' with a '.', testing the left-hand side for null if necessary");
+
+ /**
* A getter with the override annotation does not override an existing getter.
*/
static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = const HintCode(
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698