@@ -10,104 +10,105 @@ abstract class C {
10
10
direct_assignment (int ? i, int ? j) {
11
11
if (i == null ) return ;
12
12
i = j;
13
- //^
14
- // [context 1] Variable 'i' could not be promoted due to an assignment.
13
+ //^^^^^
14
+ // [context 6] Variable 'i' could not be promoted due to an assignment. See http://dart.dev/go/non-promo-write
15
+ // [context 10] Variable 'i' could not be promoted due to an assignment.
15
16
i.isEven;
16
17
// ^^^^^^
17
- // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
18
- //^
19
- // [cfe 1] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
18
+ // [analyzer 6] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
19
+ // [cfe 10] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
20
20
}
21
21
22
22
compound_assignment (C ? c, int i) {
23
23
if (c == null ) return ;
24
24
c += i;
25
- //^
26
- // [context 2] Variable 'c' could not be promoted due to an assignment.
25
+ //^^^^^^
26
+ // [context 7] Variable 'c' could not be promoted due to an assignment. See http://dart.dev/go/non-promo-write
27
+ // [context 11] Variable 'c' could not be promoted due to an assignment.
27
28
c.cProperty;
28
29
// ^^^^^^^^^
29
- // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
30
- //^
31
- // [cfe 2] Property 'cProperty' cannot be accessed on 'C?' because it is potentially null.
30
+ // [analyzer 7] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
31
+ // [cfe 11] Property 'cProperty' cannot be accessed on 'C?' because it is potentially null.
32
32
}
33
33
34
34
via_postfix_op (C ? c) {
35
35
if (c == null ) return ;
36
36
c++ ;
37
- //^
38
- // [context 3] Variable 'c' could not be promoted due to an assignment.
37
+ //^^^
38
+ // [context 4] Variable 'c' could not be promoted due to an assignment. See http://dart.dev/go/non-promo-write
39
+ // [context 12] Variable 'c' could not be promoted due to an assignment.
39
40
c.cProperty;
40
41
// ^^^^^^^^^
41
- // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
42
- //^
43
- // [cfe 3] Property 'cProperty' cannot be accessed on 'C?' because it is potentially null.
42
+ // [analyzer 4] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
43
+ // [cfe 12] Property 'cProperty' cannot be accessed on 'C?' because it is potentially null.
44
44
}
45
45
46
46
via_prefix_op (C ? c) {
47
47
if (c == null ) return ;
48
48
++ c;
49
+ //^^^
50
+ // [context 9] Variable 'c' could not be promoted due to an assignment. See http://dart.dev/go/non-promo-write
49
51
//^
50
- // [context 4 ] Variable 'c' could not be promoted due to an assignment.
52
+ // [context 13 ] Variable 'c' could not be promoted due to an assignment.
51
53
c.cProperty;
52
54
// ^^^^^^^^^
53
- // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
54
- //^
55
- // [cfe 4] Property 'cProperty' cannot be accessed on 'C?' because it is potentially null.
55
+ // [analyzer 9] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
56
+ // [cfe 13] Property 'cProperty' cannot be accessed on 'C?' because it is potentially null.
56
57
}
57
58
58
59
via_for_each_statement (int ? i, List <int ?> list) {
59
60
if (i == null ) return ;
60
61
for (i in list) {
61
62
// ^
62
- // [context 5] Variable 'i' could not be promoted due to an assignment.
63
+ // [context 3] Variable 'i' could not be promoted due to an assignment. See http://dart.dev/go/non-promo-write
64
+ // [context 14] Variable 'i' could not be promoted due to an assignment.
63
65
i.isEven;
64
66
// ^^^^^^
65
- // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
66
- //^
67
- // [cfe 5] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
67
+ // [analyzer 3] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
68
+ // [cfe 14] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
68
69
}
69
70
}
70
71
71
72
via_for_each_list_element (int ? i, List <int ?> list) {
72
73
if (i == null ) return ;
73
74
[for (i in list) i.isEven];
74
75
// ^
75
- // [context 6] Variable 'i' could not be promoted due to an assignment.
76
+ // [context 8] Variable 'i' could not be promoted due to an assignment. See http://dart.dev/go/non-promo-write
77
+ // [context 15] Variable 'i' could not be promoted due to an assignment.
76
78
// ^^^^^^
77
- // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
78
- // ^
79
- // [cfe 6] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
79
+ // [analyzer 8] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
80
+ // [cfe 15] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
80
81
}
81
82
82
83
via_for_each_set_element (int ? i, List <int ?> list) {
83
84
if (i == null ) return ;
84
85
({for (i in list) i.isEven});
85
86
// ^
86
- // [context 7] Variable 'i' could not be promoted due to an assignment.
87
+ // [context 1] Variable 'i' could not be promoted due to an assignment. See http://dart.dev/go/non-promo-write
88
+ // [context 16] Variable 'i' could not be promoted due to an assignment.
87
89
// ^^^^^^
88
- // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
89
- // ^
90
- // [cfe 7] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
90
+ // [analyzer 1] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
91
+ // [cfe 16] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
91
92
}
92
93
93
94
via_for_each_map_key (int ? i, List <int ?> list) {
94
95
if (i == null ) return ;
95
96
({for (i in list) i.isEven: null });
96
97
// ^
97
- // [context 8] Variable 'i' could not be promoted due to an assignment.
98
+ // [context 2] Variable 'i' could not be promoted due to an assignment. See http://dart.dev/go/non-promo-write
99
+ // [context 17] Variable 'i' could not be promoted due to an assignment.
98
100
// ^^^^^^
99
- // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
100
- // ^
101
- // [cfe 8] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
101
+ // [analyzer 2] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
102
+ // [cfe 17] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
102
103
}
103
104
104
105
via_for_each_map_value (int ? i, List <int ?> list) {
105
106
if (i == null ) return ;
106
107
({for (i in list) null : i.isEven});
107
108
// ^
108
- // [context 9] Variable 'i' could not be promoted due to an assignment.
109
+ // [context 5] Variable 'i' could not be promoted due to an assignment. See http://dart.dev/go/non-promo-write
110
+ // [context 18] Variable 'i' could not be promoted due to an assignment.
109
111
// ^^^^^^
110
- // [analyzer] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
111
- // ^
112
- // [cfe 9] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
112
+ // [analyzer 5] COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
113
+ // [cfe 18] Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
113
114
}
0 commit comments