Skip to main content

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

Breaking Change: Iterator.hasNext is now a getter

The Dart continues their sweep through the Dart libraries, changing methods to getters. Recently, Iterator.hasNext() became Iterator.hasNext.

Florian Loitsch writes:
Starting with r14015 Iterator.hasNext is a getter and not a method anymore.
https://codereview.chromium.org/11230011/diff/8001/lib/core/iterator.dart 
Please adapt your code by removing the parenthesis after hasNext calls:
iterator.hasNext() -> iterator.hasNext

As always, we invite you to join our Dart mailing list, ask questions on Stack Overflow, or file feature requests on dartbug.com.
OSZAR »