Skip to content

Commit c05c34e

Browse files
authored
Fixes #3119. Fix roll failures (#3120)
1 parent cc726b8 commit c05c34e

File tree

5 files changed

+11
-25
lines changed

5 files changed

+11
-25
lines changed

TypeSystem/flow-analysis/reachability_do_while_A02_t02.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@
1414
/// @author [email protected]
1515
/// @issue 60361
1616
17-
main() {
17+
test() {
1818
late int i;
1919
do {
2020
break;
2121
} while ((i = 42) < 0); // Possibly assigned. https://github.com/dart-lang/sdk/issues/42232#issuecomment-690681385
2222
i; // Not definitely unassigned
2323
}
24+
25+
main() {
26+
print(test);
27+
}

TypeSystem/flow-analysis/reachability_for_in_A01_t07.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ test1() {
1818
if (2 > 1) {
1919
for (Never n in <dynamic>[i = 42]) {}
2020
}
21-
i; // Definitely unassigned.
22-
//^
23-
// [analyzer] unspecified
24-
// [cfe] unspecified
21+
i; // Possibly assigned. See https://github.com/dart-lang/sdk/issues/60394
2522
}
2623

2724
test2(Never n) {

TypeSystem/flow-analysis/reachability_for_in_A01_t08.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ test1() {
2020
i = 42;
2121
}
2222
}
23-
i; // Definitely unassigned.
24-
//^
25-
// [analyzer] unspecified
26-
// [cfe] unspecified
23+
i; // Possibly assigned. See https://github.com/dart-lang/sdk/issues/60394
2724
}
2825

2926
test2(Never n) {

TypeSystem/flow-analysis/reachability_for_in_A01_t09.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ test1() {
1919
for (Never n in <dynamic>[42]) {}
2020
i = 42;
2121
}
22-
i; // Definitely unassigned.
23-
//^
24-
// [analyzer] unspecified
25-
// [cfe] unspecified
22+
i; // Possibly assigned. See https://github.com/dart-lang/sdk/issues/60394
2623
}
2724

2825
test2(Never n) {

TypeSystem/flow-analysis/reachability_for_in_A01_t10.dart

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,21 @@ Never foo() => throw "Never";
1919
test1() {
2020
late int i;
2121
for (i in foo()) {}
22-
i; // Definitely unassigned.
23-
//^
24-
// [analyzer] unspecified
25-
// [cfe] unspecified
22+
i; // Possibly assigned. See https://github.com/dart-lang/sdk/issues/60395
2623
}
2724

2825
test2(Never n) {
2926
late int i;
3027
for (var j in n) {
3128
i = 42;
3229
}
33-
i; // Definitely unassigned.
34-
//^
35-
// [analyzer] unspecified
36-
// [cfe] unspecified
30+
i; // Possibly assigned.
3731
}
3832

3933
test3(Never n) {
4034
late int i;
4135
for (i in [n]) {}
42-
i; // Definitely unassigned.
43-
//^
44-
// [analyzer] unspecified
45-
// [cfe] unspecified
36+
i; // Possibly assigned.
4637
}
4738

4839
main() {

0 commit comments

Comments
 (0)