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

Unified Diff: pkg/compiler/lib/src/common/names.dart

Issue 1334673002: Add warnings and hints to for-in. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/compiler/lib/src/common/names.dart
diff --git a/pkg/compiler/lib/src/common/names.dart b/pkg/compiler/lib/src/common/names.dart
index 7051ffee0cd000f4948214276f88838af44f0804..5d104efd1dc6795169b0c871a140386ecce51daa 100644
--- a/pkg/compiler/lib/src/common/names.dart
+++ b/pkg/compiler/lib/src/common/names.dart
@@ -18,10 +18,17 @@ class Identifiers {
/// The name of the call operator.
static const String call = 'call';
+ /// The name of the current element property used on iterators in for-each
+ /// loops.
+ static const String current = 'current';
+
/// The name of the from environment constructors on 'int', 'bool' and
/// 'String'.
static const String fromEnvironment = 'fromEnvironment';
+ /// The name of the iterator property used in for-each loops.
+ static const String iterator = 'iterator';
+
/// The name of the main method.
static const String main = 'main';
@@ -39,13 +46,13 @@ class Names {
/// The name of the current element property used on iterators in for-each
/// loops.
- static const Name current = const PublicName('current');
+ static const Name current = const PublicName(Identifiers.current);
/// The name of the dynamic type.
static const Name dynamic_ = const PublicName('dynamic');
/// The name of the iterator property used in for-each loops.
- static const Name iterator = const PublicName('iterator');
+ static const Name iterator = const PublicName(Identifiers.iterator);
/// The name of the move next method used on iterators in for-each loops.
static const Name moveNext = const PublicName('moveNext');
« no previous file with comments | « no previous file | pkg/compiler/lib/src/diagnostics/messages.dart » ('j') | pkg/compiler/lib/src/typechecker.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698