Skip to content

Commit

Permalink
Delete unreachable default clause. (#8303)
Browse files Browse the repository at this point in the history
The Dart analyzer will soon be changed so that if the `default` clause
of a `switch` statement is determined to be unreachable by the
exhaustiveness checker, a new warning of type
`unreachable_switch_default` will be issued. This parallels the
behavior of the existing `unreachable_switch_case` warning, which is
issued whenever a `case` clause of a `switch` statement is determined
to be unreachable. For details see
dart-lang/sdk#54575.

This PR deletes an unreachable `default` clause from `devtools` now,
to avoid a spurious warning when the analyzer change lands.
  • Loading branch information
stereotype441 committed Sep 6, 2024
1 parent 9003e6a commit af29d79
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ class LayoutProperties {
paddingB: parentSize.height - (size.height + parentData.offset.dy),
);
case SizeType.widths:
default:
return (
type: type,
paddingA: parentData.offset.dx,
Expand Down

0 comments on commit af29d79

Please sign in to comment.