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

Unified Diff: pkg/polymer/lib/src/instance.dart

Issue 26734004: use symbol literals instead of const ctor in packages (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: pkg/polymer/lib/src/instance.dart
diff --git a/pkg/polymer/lib/src/instance.dart b/pkg/polymer/lib/src/instance.dart
index 67f577b6a8ae966b4489886376cfa0a9d17d421e..2fcf144f2c2dd0c10909e717970064d34fbc3a7a 100644
--- a/pkg/polymer/lib/src/instance.dart
+++ b/pkg/polymer/lib/src/instance.dart
@@ -334,11 +334,11 @@ class PolymerElement extends CustomElement with ObservableMixin {
if (value == null) return null;
final type = inferredType.qualifiedName;
- if (type == const Symbol('dart.core.bool')) {
+ if (type == #dart.core.bool) {
return _toBoolean(value) ? '' : null;
- } else if (type == const Symbol('dart.core.String')
- || type == const Symbol('dart.core.int')
- || type == const Symbol('dart.core.double')) {
+ } else if (type == #dart.core.String
+ || type == #dart.core.int
+ || type == #dart.core.double) {
return '$value';
}
return null;
@@ -361,7 +361,7 @@ class PolymerElement extends CustomElement with ObservableMixin {
// refine the attr reflection system to achieve this; pica, for example,
// relies on having inferredType object properties not removed as
// attrs.
- } else if (inferredType.qualifiedName == const Symbol('dart.core.bool')) {
+ } else if (inferredType.qualifiedName == #dart.core.bool) {
attributes.remove(name);
}
}
@@ -910,8 +910,8 @@ TypeMirror _propertyType(DeclarationMirror property) =>
TypeMirror _inferPropertyType(Object value, DeclarationMirror property) {
var type = _propertyType(property);
- if (type.qualifiedName == const Symbol('dart.core.Object') ||
- type.qualifiedName == const Symbol('dynamic')) {
+ if (type.qualifiedName == #dart.core.Object ||
+ type.qualifiedName == #dynamic) {
// Attempt to infer field type from the default value.
if (value != null) {
type = reflect(value).type;

Powered by Google App Engine
This is Rietveld 408576698