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

Unified Diff: tests/language/mixin_getter_regression_test.dart

Issue 12298029: Turn error into warning for non-static member access through the class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/mixin_getter_regression_test.dart
diff --git a/tests/language/mixin_getter_regression_test.dart b/tests/language/mixin_getter_regression_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..52603c6d9bace7cd50120834705115fb243a124e
--- /dev/null
+++ b/tests/language/mixin_getter_regression_test.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test case for dart2js bug where the getter for y wasn't
+// properly mixed in.
Johnni Winther 2013/02/19 09:18:49 How is this test related to the changes?
kasperl 2013/02/19 09:20:59 Before this change abstract fields (like the gette
+
+class C {
+ int x;
+ int get y => x;
+}
+
+class E {
+ int z = 10;
+}
+
+class D extends E with C {
+ int w = 42;
+}
+
+main() {
+ var d = new D();
+ d.x = 37;
+ Expect.equals(37, d.x);
+ Expect.equals(10, d.z);
+ Expect.equals(42, d.w);
+ Expect.equals(37, d.y);
+}
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698