Index: pkg/kernel/testcases/interpreter/object_property_access.dart |
diff --git a/pkg/kernel/testcases/interpreter/object_property_access.dart b/pkg/kernel/testcases/interpreter/object_property_access.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bce4ef5c32127d8931309c91aece272a248be775 |
--- /dev/null |
+++ b/pkg/kernel/testcases/interpreter/object_property_access.dart |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 2017, 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. |
+ |
+library object_property_access_test; |
+ |
+main() { |
+ var a1 = new A(); |
+ print(a1.a); |
+ print(a1.b); |
+ |
+ a1.a = 3; |
+ print(a1.doubleA); |
+ |
+ var a2 = new A.withArgs(1, 2); |
+ print(a2.a); |
+ print(a2.b); |
+ |
+ print(a2.doubleA); |
+ a2.setA = 42; |
+ print(a2.a); |
+} |
+ |
+class A { |
+ int a; |
+ int b = 42; |
+ |
+ A(); |
+ A.withArgs(this.a, this.b); |
+ |
+ int get doubleA => a + a; |
+ |
+ void set setA(int a) { |
+ this.a = a; |
+ } |
+} |