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

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: 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 80d93d3d4b016b31f0727a0c8f4f33e1d654d32c..bb5221ef8c915283a743f416af20f00442a1fe1f 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;

Powered by Google App Engine
This is Rietveld 408576698