OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /*@testedFeatures=inference*/ | 5 /*@testedFeatures=inference*/ |
6 library test; | 6 library test; |
7 | 7 |
8 class C { | 8 class C { |
9 int field = 0; | 9 int field = 0; |
10 int get getter => 0; | 10 int get getter => 0; |
11 int function() => 0; | 11 int function() => 0; |
12 } | 12 } |
13 | 13 |
14 C c = new C(); | 14 C c = new C(); |
15 var /*@topType=dynamic*/ field_ref = c. /*@target=C::field*/ field; | |
16 var /*@topType=dynamic*/ getter_ref = c. /*@target=C::getter*/ getter; | |
17 var /*@topType=() -> int*/ function_ref = c. /*@target=C::function*/ function; | 15 var /*@topType=() -> int*/ function_ref = c. /*@target=C::function*/ function; |
18 var /*@topType=dynamic*/ field_ref_list = /*@typeArgs=int*/ [ | |
19 c. /*@target=C::field*/ field | |
20 ]; | |
21 var /*@topType=dynamic*/ getter_ref_list = /*@typeArgs=int*/ [ | |
22 c. /*@target=C::getter*/ getter | |
23 ]; | |
24 var /*@topType=List<() -> int>*/ function_ref_list = /*@typeArgs=() -> int*/ [ | 16 var /*@topType=List<() -> int>*/ function_ref_list = /*@typeArgs=() -> int*/ [ |
25 c. /*@target=C::function*/ function | 17 c. /*@target=C::function*/ function |
26 ]; | 18 ]; |
27 | 19 |
28 main() {} | 20 main() {} |
OLD | NEW |