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 A { | 8 class A { |
9 int f; | 9 int f; |
10 } | 10 } |
11 | 11 |
12 var /*@topType=dynamic*/ v_assign = | 12 var /*@topType=dynamic*/ v_assign = |
13 (/*error:TOP_LEVEL_UNSUPPORTED*/ new A(). /*@target=A::f*/ f = 1); | 13 (/*error:TOP_LEVEL_UNSUPPORTED*/ new A(). /*@target=A::f*/ f = 1); |
14 var /*@topType=dynamic*/ v_plus = | 14 var /*@topType=dynamic*/ v_plus = |
15 (/*error:TOP_LEVEL_UNSUPPORTED*/ new A(). /*@target=A::f*/ f += 1); | 15 (/*error:TOP_LEVEL_UNSUPPORTED*/ new A(). /*@target=A::f*/ f += 1); |
16 var /*@topType=dynamic*/ v_minus = | 16 var /*@topType=dynamic*/ v_minus = |
17 (/*error:TOP_LEVEL_UNSUPPORTED*/ new A(). /*@target=A::f*/ f -= 1); | 17 (/*error:TOP_LEVEL_UNSUPPORTED*/ new A(). /*@target=A::f*/ f -= 1); |
18 var /*@topType=dynamic*/ v_multiply = | 18 var /*@topType=dynamic*/ v_multiply = |
19 (/*error:TOP_LEVEL_UNSUPPORTED*/ new A(). /*@target=A::f*/ f *= 1); | 19 (/*error:TOP_LEVEL_UNSUPPORTED*/ new A(). /*@target=A::f*/ f *= 1); |
20 var /*@topType=dynamic*/ v_prefix_pp = (/*@target=num::+*/ ++new A() | 20 var /*@topType=dynamic*/ v_prefix_pp = |
21 . /*error:TOP_LEVEL_INSTANCE_GETTER*/ /*@target=A::f*/ f); | 21 (++new A(). /*error:TOP_LEVEL_INSTANCE_GETTER*/ /*@target=A::f*/ f); |
22 var /*@topType=dynamic*/ v_prefix_mm = (/*@target=num::-*/ --new A() | 22 var /*@topType=dynamic*/ v_prefix_mm = |
23 . /*error:TOP_LEVEL_INSTANCE_GETTER*/ /*@target=A::f*/ f); | 23 (--new A(). /*error:TOP_LEVEL_INSTANCE_GETTER*/ /*@target=A::f*/ f); |
24 var /*@topType=dynamic*/ v_postfix_pp = | 24 var /*@topType=dynamic*/ v_postfix_pp = |
25 (new A(). /*error:TOP_LEVEL_INSTANCE_GETTER*/ /*@target=A::f*/ f++); | 25 (new A(). /*error:TOP_LEVEL_INSTANCE_GETTER*/ /*@target=A::f*/ f++); |
26 var /*@topType=dynamic*/ v_postfix_mm = | 26 var /*@topType=dynamic*/ v_postfix_mm = |
27 (new A(). /*error:TOP_LEVEL_INSTANCE_GETTER*/ /*@target=A::f*/ f--); | 27 (new A(). /*error:TOP_LEVEL_INSTANCE_GETTER*/ /*@target=A::f*/ f--); |
28 | 28 |
29 main() {} | 29 main() {} |
OLD | NEW |