Skip to content

Commit 10f53cb

Browse files
munificentCommit Queue
authored and
Commit Queue
committed
Remove incorrect part of int-to-double test.
Switch statements on ints aren't required to be exhaustive. Change-Id: I85701b098cacf9d01241dab821ae4c70f04a0710 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289450 Commit-Queue: Bob Nystrom <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Auto-Submit: Bob Nystrom <[email protected]>
1 parent 9833cb4 commit 10f53cb

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

tests/language/patterns/int_to_double_error_test.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@ main() {
2222
// ^
2323
// [cfe] The matched value of type 'int' isn't assignable to the required type 'double'.
2424

25-
// Non-exhaustive since double case doesn't cover uncoerced int type.
26-
switch (123) {
27-
//^^^^^^
28-
// [analyzer] COMPILE_TIME_ERROR.NON_EXHAUSTIVE_SWITCH
29-
// ^
30-
// [cfe] The type 'int' is not exhaustively matched by the switch cases.
31-
case double d:
32-
Expect.fail('Should not have matched.');
33-
}
34-
3525
// Non-exhaustive since double case doesn't cover uncoerced int type.
3626
var result = switch (123) {
3727
// ^^^^^^

0 commit comments

Comments
 (0)