diff --git a/src/ast.rs b/src/ast.rs index 6341aa026..c66d4b2b2 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -3580,8 +3580,7 @@ fn new_decorated_statement(slf: &mut Populator<'_>) -> StatementVariant { let naked_invocation_invokes_help = ![ParseKeyword::Begin, ParseKeyword::End].contains(&self.peek_token(0).keyword); if naked_invocation_invokes_help - && [ParseTokenType::end, ParseTokenType::terminate] - .contains(&self.peek_token(1).typ) + && [ParseTokenType::terminate].contains(&self.peek_token(1).typ) { return new_decorated_statement(self); } diff --git a/tests/checks/switch.fish b/tests/checks/switch.fish index 7e1d56b10..ed5feb38e 100644 --- a/tests/checks/switch.fish +++ b/tests/checks/switch.fish @@ -66,9 +66,9 @@ switch echo banana end ' -#CHECKERR: fish: 'case' builtin not inside of switch block -#CHECKERR: case a -#CHECKERR: ^~~^ +# CHECKERR: fish: Expected a string, but found end of the statement +# CHECKERR: switch +# CHECKERR: ^ set smurf green