Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: pkg/front_end/testcases/inference/infer_assign_to_property.dart

Issue 2926763003: Add type inference for complex assignments whose LHS is an index expression. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698