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

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
« no previous file with comments | « pkg/polymer/lib/src/declaration.dart ('k') | pkg/polymer/lib/src/loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/instance.dart
diff --git a/pkg/polymer/lib/src/instance.dart b/pkg/polymer/lib/src/instance.dart
index 2773c411e9a9824ada8c510baba5eff9270c173f..aa3276fa5a468f0df91d3fae99674019d34fa0cd 100644
--- a/pkg/polymer/lib/src/instance.dart
+++ b/pkg/polymer/lib/src/instance.dart
@@ -342,11 +342,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;
@@ -369,7 +369,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);
}
}
@@ -918,8 +918,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;
« no previous file with comments | « pkg/polymer/lib/src/declaration.dart ('k') | pkg/polymer/lib/src/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698