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

Unified Diff: pkg/analysis_server/lib/src/services/refactoring/naming_conventions.dart

Issue 2802433002: do not allow built-in keywords to specified when refactoring (Closed)
Patch Set: add tests Created 3 years, 8 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/analysis_server/test/services/refactoring/naming_conventions_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/refactoring/naming_conventions.dart
diff --git a/pkg/analysis_server/lib/src/services/refactoring/naming_conventions.dart b/pkg/analysis_server/lib/src/services/refactoring/naming_conventions.dart
index 892da77aa6129a674138e21aaa2d51e0ba17d3cc..7b5dab2fb1e1f17c7f40c9e195736f8d538b6265 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/naming_conventions.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/naming_conventions.dart
@@ -6,7 +6,7 @@ library services.src.refactoring.naming_conventions;
import 'package:analysis_server/src/services/correction/status.dart';
import 'package:analysis_server/src/services/correction/strings.dart';
-import 'package:analyzer/dart/ast/token.dart';
+import 'package:front_end/src/fasta/scanner/keyword.dart' as fasta;
/**
* Returns the [RefactoringStatus] with severity:
@@ -167,8 +167,8 @@ RefactoringStatus _validateIdentifier(
}
// keyword
{
- Keyword keyword = Keyword.keywords[identifier];
- if (keyword != null && !keyword.isPseudoKeyword) {
+ fasta.Keyword keyword = fasta.Keyword.keywords[identifier];
+ if (keyword != null) {
String message = "$desc must not be a keyword.";
return new RefactoringStatus.fatal(message);
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698