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

Unified Diff: pkg/analyzer/lib/src/services/formatter_impl.dart

Issue 724093007: Prevent CodeKind constants from being canonicalized. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/services/formatter_impl.dart
diff --git a/pkg/analyzer/lib/src/services/formatter_impl.dart b/pkg/analyzer/lib/src/services/formatter_impl.dart
index 3e4bcc50187c79bc30e101b25c656fa04bdc7859..8cc329d6d553d49483834f2abbe3fa0d4575c340 100644
--- a/pkg/analyzer/lib/src/services/formatter_impl.dart
+++ b/pkg/analyzer/lib/src/services/formatter_impl.dart
@@ -59,13 +59,15 @@ class FormatterException implements Exception {
/// Specifies the kind of code snippet to format.
class CodeKind {
- const CodeKind._();
+ final int ordinal;
Brian Wilkerson 2014/11/14 19:16:15 Alternatively, we could give them a name, which wo
+
+ const CodeKind._(this.ordinal);
/// A compilation unit snippet.
- static const COMPILATION_UNIT = const CodeKind._();
+ static const COMPILATION_UNIT = const CodeKind._(0);
/// A statement snippet.
- static const STATEMENT = const CodeKind._();
+ static const STATEMENT = const CodeKind._(1);
}
« 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