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

Unified Diff: pkg/serialization/lib/src/serialization_rule.dart

Issue 12604023: Add test and fix for 9203, fix sdk dep, delete unused file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes from review Created 7 years, 9 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/serialization/lib/src/polyfill_identity_set.dart ('k') | pkg/serialization/test/no_library_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/serialization/lib/src/serialization_rule.dart
diff --git a/pkg/serialization/lib/src/serialization_rule.dart b/pkg/serialization/lib/src/serialization_rule.dart
index 408d40b3f228e8df53943d6e6e6da67f4fa55bfd..01b3b0535f528aeda96b953ff686135148c65cce 100644
--- a/pkg/serialization/lib/src/serialization_rule.dart
+++ b/pkg/serialization/lib/src/serialization_rule.dart
@@ -398,8 +398,9 @@ class MirrorRule extends NamedObjectRule {
var qualifiedName = r.resolveReference(state.first);
var lookupFull = r.objectNamed(qualifiedName, (x) => null);
if (lookupFull != null) return lookupFull;
- var lib = qualifiedName.substring(0, qualifiedName.indexOf("."));
- var type = qualifiedName.substring(qualifiedName.indexOf(".") + 1);
+ var separatorIndex = qualifiedName.lastIndexOf(".");
+ var lib = qualifiedName.substring(0, separatorIndex);
+ var type = qualifiedName.substring(separatorIndex + 1);
var lookup = r.objectNamed(type, (x) => null);
if (lookup != null) return lookup;
var libMirror = currentMirrorSystem().libraries[lib];
@@ -541,6 +542,7 @@ class _LazyList extends Iterable implements List {
Iterator get iterator => _inflated.iterator;
indexOf(x, [pos = 0]) => _inflated.toList().indexOf(x);
lastIndexOf(x, [pos]) => _inflated.toList().lastIndexOf(x);
+ sublist(start, [end]) => _inflated.sublist(start, end);
Map<int, dynamic> asMap() => IterableMixinWorkaround.asMapList(this);
« no previous file with comments | « pkg/serialization/lib/src/polyfill_identity_set.dart ('k') | pkg/serialization/test/no_library_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698