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

Unified Diff: lib/compiler/implementation/types/concrete_types_inferrer.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/types/concrete_types_inferrer.dart
diff --git a/lib/compiler/implementation/types/concrete_types_inferrer.dart b/lib/compiler/implementation/types/concrete_types_inferrer.dart
index 8c1b89b37122f8ebf6de46f940085cb0f34d6d94..ed992f85cc782d25854904cbd9b836be88e71934 100644
--- a/lib/compiler/implementation/types/concrete_types_inferrer.dart
+++ b/lib/compiler/implementation/types/concrete_types_inferrer.dart
@@ -215,7 +215,7 @@ class ConcreteTypeCartesianProductIterator implements Iterator {
}
}
- bool hasNext() {
+ bool get hasNext {
return counter < size;
}
@@ -226,11 +226,11 @@ class ConcreteTypeCartesianProductIterator implements Iterator {
}
ConcreteTypesEnvironment next() {
- if (!hasNext()) throw new NoMoreElementsException();
+ if (!hasNext) throw new NoMoreElementsException();
Element keyToIncrement = null;
for (final key in concreteTypes.getKeys()) {
final iterator = state[key];
- if (iterator != null && iterator.hasNext()) {
+ if (iterator != null && iterator.hasNext) {
nextValues[key] = state[key].next();
break;
}
@@ -577,7 +577,7 @@ class ConcreteTypesInferrer {
// we attach the remaining positional arguments to their corresponding
// named arguments
Link<Element> remainingNamedParameters = signature.optionalParameters;
- while (remainingPositionalArguments.hasNext()) {
+ while (remainingPositionalArguments.hasNext) {
final Element namedParameter = remainingNamedParameters.head;
result[namedParameter] = remainingPositionalArguments.next();
// we know tail is defined because of the guard above
« no previous file with comments | « lib/compiler/implementation/tree/dartstring.dart ('k') | lib/compiler/implementation/util/link_implementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698