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); |
+} |