diff src/vim9compile.c @ 32452:c1f730c2b51e v9.0.1557

patch 9.0.1557: test failures for unreachable code Commit: https://github.com/vim/vim/commit/9d383f30bbd06552ad0bf343b2c03c6a0d1f6df2 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 14 21:38:12 2023 +0100 patch 9.0.1557: test failures for unreachable code Problem: Test failures for unreachable code. Solution: Add a test override to ignore unreachable code.
author Bram Moolenaar <Bram@vim.org>
date Sun, 14 May 2023 22:45:04 +0200
parents 72ffe2b9a4b1
children db97ccaaa7c8
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3493,7 +3493,8 @@ compile_def_function(
 		&& ea.cmdidx != CMD_endwhile
 		&& ea.cmdidx != CMD_catch
 		&& ea.cmdidx != CMD_finally
-		&& ea.cmdidx != CMD_endtry)
+		&& ea.cmdidx != CMD_endtry
+		&& !ignore_unreachable_code_for_testing)
 	{
 	    emsg(_(e_unreachable_code_after_return));
 	    goto erret;