Skip to content

Commit 2184640

Browse files
authored
#3057. Expect error in reachability_for_A03_t05.dart test. (#3132)
1 parent 2f014f0 commit 2184640

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

TypeSystem/flow-analysis/reachability_for_A03_t05.dart

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,30 @@
1111
/// - Let `after(N) = inheritTested(join(false(C), unsplit(break(S))), after(U))`
1212
///
1313
/// @description Checks that `before(U) = merge(after(S), continue(S))`. Test
14-
/// that if `D`, `C` and `S` are empty then an assignment in `U` is a definite
15-
/// assignment.
14+
/// that if `D`, `C` and `S` are empty then an assignment in `U` is treated as a
15+
/// "possibly assigned".
1616
/// @author [email protected]
1717
/// @issue 60320
1818
1919
test1() {
2020
int i;
2121
for (;; i = 42) {
2222
}
23-
i; // Dead code but definitely assigned.
23+
i; // Possibly assigned. See https://github.com/dart-lang/sdk/issues/60320#issuecomment-2776599140
24+
//^
25+
// [analyzer] unspecified
26+
// [cfe] unspecified
2427
}
2528

2629
test2() {
2730
int i;
2831
[
2932
for (;; i = 42) 0
3033
];
31-
i; // Dead code but definitely assigned.
34+
i;
35+
//^
36+
// [analyzer] unspecified
37+
// [cfe] unspecified
3238
}
3339

3440
test3() {
@@ -37,7 +43,10 @@ test3() {
3743
for (;; i = 42)
3844
0: 0
3945
};
40-
i; // Dead code but definitely assigned.
46+
i;
47+
//^
48+
// [analyzer] unspecified
49+
// [cfe] unspecified
4150
}
4251

4352
main() {

TypeSystem/flow-analysis/reachability_for_A03_t06.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class C {
2222

2323
test1() {
2424
late int i;
25-
for (;; i = 42) { // Possibly assigned. https://github.com/dart-lang/sdk/issues/42232#issuecomment-690681385
25+
for (;; i = 42) { // Possibly assigned. https://github.com/dart-lang/sdk/issues/60320#issuecomment-2776599140
2626
break;
2727
}
2828
try {

0 commit comments

Comments
 (0)