Index: compiler/lib/implementation/array.dart |
=================================================================== |
--- compiler/lib/implementation/array.dart (revision 942) |
+++ compiler/lib/implementation/array.dart (working copy) |
@@ -147,12 +147,13 @@ |
return list; |
} |
- int indexOf(T element, int startIndex) { |
- return Arrays.indexOf(this, element, startIndex, this.length); |
+ int indexOf(T element, [int start = 0]) { |
+ return Arrays.indexOf(this, element, start, this.length); |
} |
- int lastIndexOf(T element, int startIndex) { |
- return Arrays.lastIndexOf(this, element, startIndex); |
+ int lastIndexOf(T element, [int start = null]) { |
+ if (start === null) start = length - 1; |
+ return Arrays.lastIndexOf(this, element, start); |
} |
void add(T element) { |