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

Unified Diff: client/dom/scripts/dartgenerator.py

Issue 8424012: Add optional arguments to our indexOf/lastIndexOf methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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: client/dom/scripts/dartgenerator.py
===================================================================
--- client/dom/scripts/dartgenerator.py (revision 942)
+++ client/dom/scripts/dartgenerator.py (working copy)
@@ -1280,12 +1280,13 @@
' throw new UnsupportedOperationException("This object is immutable.");\n'
' }\n'
'\n'
- ' int indexOf($TYPE element, int startIndex) {\n'
- ' return _Lists.indexOf(this, element, startIndex, this.length);\n'
+ ' int indexOf($TYPE element, [int start = 0]) {\n'
+ ' return _Lists.indexOf(this, element, start, this.length);\n'
' }\n'
'\n'
- ' int lastIndexOf($TYPE element, int startIndex) {\n'
- ' return _Lists.lastIndexOf(this, element, startIndex);\n'
+ ' int lastIndexOf($TYPE element, [int start = null]) {\n'
+ ' if (start === null) start = length - 1;\n'
+ ' return _Lists.lastIndexOf(this, element, start);\n'
' }\n'
'\n'
' int clear() {\n'

Powered by Google App Engine
This is Rietveld 408576698