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

Unified Diff: sdk/lib/_internal/compiler/implementation/util/link.dart

Issue 11778039: Report arity errors on user definable operators. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments + Link test updated. Created 7 years, 11 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: sdk/lib/_internal/compiler/implementation/util/link.dart
diff --git a/sdk/lib/_internal/compiler/implementation/util/link.dart b/sdk/lib/_internal/compiler/implementation/util/link.dart
index d16ae6cce472e95d0d84ea50550cddc5727eeacc..a78f3954b42848c1cb3b9745ea4978325df22943 100644
--- a/sdk/lib/_internal/compiler/implementation/util/link.dart
+++ b/sdk/lib/_internal/compiler/implementation/util/link.dart
@@ -49,6 +49,11 @@ class Link<T> extends Iterable<T> {
return this.prepend(from.head).reversePrependAll(from.tail);
}
+ Link<T> skip(int n) {
+ if (n == 0) return this;
+ throw new RangeError('Index $n out of range');
+ }
+
void forEach(void f(T element)) {}
bool operator ==(other) {

Powered by Google App Engine
This is Rietveld 408576698