Skip to content

Commit dd49a24

Browse files
committed
Delete unreachable default clause.
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 `dart-sass` now, to avoid a spurious warning when the analyzer change lands.
1 parent 9f82850 commit dd49a24

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/src/ast/sass/statement/stylesheet.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ final class Stylesheet extends ParentStatement<List<Statement>> {
9191
return Stylesheet.parseScss(contents, url: url, logger: logger);
9292
case Syntax.css:
9393
return Stylesheet.parseCss(contents, url: url, logger: logger);
94-
default:
95-
throw ArgumentError("Unknown syntax $syntax.");
9694
}
9795
} on SassException catch (error, stackTrace) {
9896
var url = error.span.sourceUrl;

0 commit comments

Comments
 (0)