Skip to content

Commit 7e4321a

Browse files
authored
#3057. Update expectations for while(false) ... test (#3114)
1 parent 6ba3ad8 commit 7e4321a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

TypeSystem/flow-analysis/definite_assignment_A05_t03.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
///
1010
/// @description Checks that if the condition of a `while` statement is the
1111
/// `false` literal, then an assignment in the body of the loop is treated by
12-
/// flow analysis as a definite unassignment.
12+
/// flow analysis as `possible assigned`.
1313
/// @author [email protected]
1414
/// @issue 60322
1515
@@ -18,8 +18,5 @@ main() {
1818
while (false) {
1919
n = 42;
2020
}
21-
n; // It's an error to read local non-nullable variable when it is not definitely assigned
22-
//^
23-
// [analyzer] unspecified
24-
// [cfe] unspecified
21+
n; // Possibly assigned. See https://github.com/dart-lang/sdk/issues/60322
2522
}

0 commit comments

Comments
 (0)