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<T extends num> { | 8 class C<T extends num> { |
9 T a; | 9 T a; |
10 | 10 |
11 void op(T b) { | 11 void op(T b) { |
12 T r1 = a /*@target=num::+*/ + b; | 12 T r1 = /*@target=C::a*/ a /*@target=num::+*/ + b; |
13 T r2 = a /*@target=num::-*/ - b; | 13 T r2 = /*@target=C::a*/ a /*@target=num::-*/ - b; |
14 T r3 = a /*@target=num::**/ * b; | 14 T r3 = /*@target=C::a*/ a /*@target=num::**/ * b; |
15 } | 15 } |
16 | 16 |
17 void opEq(T b) { | 17 void opEq(T b) { |
18 a += b; | 18 /*@target=C::a*/ a += b; |
19 a -= b; | 19 /*@target=C::a*/ a -= b; |
20 a *= b; | 20 /*@target=C::a*/ a *= b; |
21 } | 21 } |
22 } | 22 } |
23 | 23 |
24 main() {} | 24 main() {} |
OLD | NEW |