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

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

Issue 2919623002: Implement type inference for PropertySet. (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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 /*@testedFeatures=inference*/
6 library test;
7
8 class A<T> {
9 List<T> x;
10 void set y(List<T> value) {}
11 }
12
13 main() {
14 A<int> a_int = new A<int>();
15 A<Object> a_object = new A<Object>();
16 A<dynamic> a_dynamic = new A<dynamic>();
17 var /*@type=List<int>*/ x_int =
18 a_int. /*@target=A::x*/ x = /*@typeArgs=int*/ [0];
19 var /*@type=List<int>*/ y_int =
20 a_int. /*@target=A::y*/ y = /*@typeArgs=int*/ [0];
21 var /*@type=List<Object>*/ x_object =
22 a_object. /*@target=A::x*/ x = /*@typeArgs=Object*/ [0];
23 var /*@type=List<Object>*/ y_object =
24 a_object. /*@target=A::y*/ y = /*@typeArgs=Object*/ [0];
25 var /*@type=List<dynamic>*/ x_dynamic =
26 a_dynamic. /*@target=A::x*/ x = /*@typeArgs=dynamic*/ [0];
27 var /*@type=List<dynamic>*/ y_dynamic =
28 a_dynamic. /*@target=A::y*/ y = /*@typeArgs=dynamic*/ [0];
29 var /*@type=List<int>*/ x_int_explicit = a_int. /*@target=A::x*/ x = <int>[0];
30 var /*@type=List<int>*/ y_int_explicit = a_int. /*@target=A::y*/ y = <int>[0];
31 var /*@type=List<int>*/ x_object_explicit =
32 a_object. /*@target=A::x*/ x = <int>[0];
33 var /*@type=List<int>*/ y_object_explicit =
34 a_object. /*@target=A::y*/ y = <int>[0];
35 var /*@type=List<int>*/ x_dynamic_explicit =
36 a_dynamic. /*@target=A::x*/ x = <int>[0];
37 var /*@type=List<int>*/ y_dynamic_explicit =
38 a_dynamic. /*@target=A::y*/ y = <int>[0];
39 List<int> x_int_downward = a_int. /*@target=A::x*/ x = /*@typeArgs=int*/ [0];
40 List<int> y_int_downward = a_int. /*@target=A::y*/ y = /*@typeArgs=int*/ [0];
41 List<int> x_object_downward =
42 a_object. /*@target=A::x*/ x = /*@typeArgs=Object*/ [0];
43 List<int> y_object_downward =
44 a_object. /*@target=A::y*/ y = /*@typeArgs=Object*/ [0];
45 List<int> x_dynamic_downward =
46 a_dynamic. /*@target=A::x*/ x = /*@typeArgs=dynamic*/ [0];
47 List<int> y_dynamic_downward =
48 a_dynamic. /*@target=A::y*/ y = /*@typeArgs=dynamic*/ [0];
49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698