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

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

Issue 1252123004: Fix highlight range for missing enum constant in switch (issue 23904) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index e80e02abdd0c8528ad1717884a64134c084879e3..e0303d27b62fec14aa7354e1c38b80fa4427f355 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -4113,8 +4113,10 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
return false;
}
for (int i = 0; i < nameCount; i++) {
- _errorReporter.reportErrorForNode(
- CompileTimeErrorCode.MISSING_ENUM_CONSTANT_IN_SWITCH, statement,
+ int offset = statement.offset;
+ int end = statement.rightParenthesis.end;
+ _errorReporter.reportErrorForOffset(
+ CompileTimeErrorCode.MISSING_ENUM_CONSTANT_IN_SWITCH, offset, end - offset,
[constantNames[i]]);
}
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698