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

Unified Diff: lib/compiler/implementation/lib/js_helper.dart

Issue 11230011: Make hasNext a getter instead of a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variable. Created 8 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: lib/compiler/implementation/lib/js_helper.dart
diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart
index a961599608584f2ed9c6f2226afca6ad0a82006d..891b69840cf99333ad58a6d07b83335ba9df86aa 100644
--- a/lib/compiler/implementation/lib/js_helper.dart
+++ b/lib/compiler/implementation/lib/js_helper.dart
@@ -343,9 +343,9 @@ class ListIterator<T> implements Iterator<T> {
int i;
List<T> list;
ListIterator(List<T> this.list) : i = 0;
- bool hasNext() => i < JS('int', r'#.length', list);
+ bool get hasNext => i < JS('int', r'#.length', list);
T next() {
- if (!hasNext()) throw new NoMoreElementsException();
+ if (!hasNext) throw new NoMoreElementsException();
var value = JS('Object', r'#[#]', list, i);
i += 1;
return value;
@@ -971,7 +971,7 @@ class StackTrace {
makeLiteralMap(List keyValuePairs) {
Iterator iterator = keyValuePairs.iterator();
Map result = new LinkedHashMap();
- while (iterator.hasNext()) {
+ while (iterator.hasNext) {
String key = iterator.next();
var value = iterator.next();
result[key] = value;
« no previous file with comments | « lib/compiler/implementation/lib/interceptors.dart ('k') | lib/compiler/implementation/lib/string_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698