Index: tests/language_strong/abstract_getter2_test.dart |
diff --git a/tests/language_strong/abstract_getter2_test.dart b/tests/language_strong/abstract_getter2_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9553ba4987958ad6aaaede9820203f477fe832a9 |
--- /dev/null |
+++ b/tests/language_strong/abstract_getter2_test.dart |
@@ -0,0 +1,27 @@ |
+// Copyright (c) 2016, 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. |
+ |
+import "package:expect/expect.dart"; |
+ |
+class A { |
+ int get x => 100; |
+} |
+ |
+abstract class B extends A { |
+ int _x; |
+ |
+ int get x; |
+ set x(int v) { _x = v; } |
+} |
+ |
+class C extends B { |
+ int get x => super.x; |
+} |
+ |
+void main() { |
+ B b = new C(); |
+ b.x = 42; |
+ Expect.equals(b._x, 42); |
+ Expect.equals(b.x, 100); |
+} |