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

Unified Diff: test/codegen/language/list_mixin_test.dart

Issue 1949163003: fix for #520, ListMixin should work again (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « test/browser/language_tests.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/language/list_mixin_test.dart
diff --git a/test/codegen/language/list_mixin_test.dart b/test/codegen/language/list_mixin_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..5ae8563ec988800956641ab3493ac4fa0030b1ee
--- /dev/null
+++ b/test/codegen/language/list_mixin_test.dart
@@ -0,0 +1,16 @@
+import 'dart:collection';
+import 'package:expect/expect.dart';
+
+class MyList extends ListBase {
+ int get length => 4;
+ set length(int x) {}
+ int operator[](int x) => 42;
+ void operator[]=(int x, val) {}
+}
+
+main() {
+ var x = new MyList();
+ int z = 0;
+ x.forEach((y) { z += y; });
+ Expect.equals(z, 4 * 42);
+}
« no previous file with comments | « test/browser/language_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698