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

Unified Diff: lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
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:
Download patch
« no previous file with comments | « lib/coreimpl/queue.dart ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dart2js/html_dart2js.dart
diff --git a/lib/html/dart2js/html_dart2js.dart b/lib/html/dart2js/html_dart2js.dart
index b4ce75efcddadf3e15a4335b74e24808c2937172..8ac57fa6ccc002787794bde297227eb5c0a85d58 100644
--- a/lib/html/dart2js/html_dart2js.dart
+++ b/lib/html/dart2js/html_dart2js.dart
@@ -11650,7 +11650,7 @@ class _FrozenElementListIterator implements Iterator<Element> {
* [NoMoreElementsException] if no element is left.
*/
Element next() {
- if (!hasNext()) {
+ if (!hasNext) {
throw const NoMoreElementsException();
}
@@ -11660,7 +11660,7 @@ class _FrozenElementListIterator implements Iterator<Element> {
/**
* Returns whether the [Iterator] has elements left.
*/
- bool hasNext() => _index < _list.length;
+ bool get hasNext => _index < _list.length;
}
class _ElementAttributeMap implements AttributeMap {
@@ -38979,7 +38979,7 @@ class _Collections {
}
static bool isEmpty(Iterable<Object> iterable) {
- return !iterable.iterator().hasNext();
+ return !iterable.iterator().hasNext;
}
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -40648,7 +40648,7 @@ class _FixedSizeListIterator<T> extends _VariableSizeListIterator<T> {
: super(array),
_length = array.length;
- bool hasNext() => _length > _pos;
+ bool get hasNext => _length > _pos;
final int _length; // Cache array length for faster access.
}
@@ -40659,10 +40659,10 @@ class _VariableSizeListIterator<T> implements Iterator<T> {
: _array = array,
_pos = 0;
- bool hasNext() => _array.length > _pos;
+ bool get hasNext => _array.length > _pos;
T next() {
- if (!hasNext()) {
+ if (!hasNext) {
throw const NoMoreElementsException();
}
return _array[_pos++];
« no previous file with comments | « lib/coreimpl/queue.dart ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698