diff options
| author | sebres <sebres@users.sourceforge.net> | 2022-04-26 13:35:26 (GMT) |
|---|---|---|
| committer | sebres <sebres@users.sourceforge.net> | 2022-04-26 13:35:26 (GMT) |
| commit | a69bdcf1eea657ee8dfe8cba2071b0ed269531ea (patch) | |
| tree | 16e87cafff972aeb8bbcddb5b6abd0a68f4a14a9 | |
| parent | 257691ef7309a95aa418da8017492f3c4c223fd6 (diff) | |
| parent | aabacf9e13f8a62c916f79cde849149ab05b73c0 (diff) | |
| download | tcl-a69bdcf1eea657ee8dfe8cba2071b0ed269531ea.zip tcl-a69bdcf1eea657ee8dfe8cba2071b0ed269531ea.tar.gz tcl-a69bdcf1eea657ee8dfe8cba2071b0ed269531ea.tar.bz2 | |
merge 8.7
| -rw-r--r-- | generic/tclCompCmdsSZ.c | 3 | ||||
| -rw-r--r-- | tests/error.test | 7 | ||||
| -rw-r--r-- | win/Makefile.in | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 64c6fcc..875cede 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -2980,6 +2980,9 @@ TclCompileTryCmd( goto failedToCompile; } finallyToken = TokenAfter(tokenPtr); + if (finallyToken->type != TCL_TOKEN_SIMPLE_WORD) { + goto failedToCompile; + } } else { goto failedToCompile; } diff --git a/tests/error.test b/tests/error.test index 064edc7..4ce7709 100644 --- a/tests/error.test +++ b/tests/error.test @@ -351,6 +351,13 @@ test error-9.4 {try (ok, non-empty result) with on handler} { test error-9.5 {try (ok, non-empty result) with on ok handler} { try { list a b c } on ok {} { list d e f } } {d e f} +test error-9.6 {try (compilation of simple finaly token only, bug [27520c9b17])} -body { + set b {}; set l {} + try {lappend l error} finally [lappend l set b] + list $l $b +} -cleanup { + unset -nocomplain b l +} -result {{set b error} {}} # simple try tests - "on" handler matching diff --git a/win/Makefile.in b/win/Makefile.in index 0116e8b..b5aed05 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -98,6 +98,7 @@ COMPILE_DEBUG_FLAGS = SRC_DIR = @srcdir@ ROOT_DIR = @srcdir@/.. TOP_DIR = $(shell cd @srcdir@/..; pwd -W 2>/dev/null || pwd -P) +BUILD_DIR = @builddir@ GENERIC_DIR = $(TOP_DIR)/generic WIN_DIR = $(TOP_DIR)/win COMPAT_DIR = $(TOP_DIR)/compat @@ -251,7 +252,7 @@ MINIZIP_OBJS = \ ZIP_INSTALL_OBJS = @ZIP_INSTALL_OBJS@ -CC_SWITCHES = -I"${GENERIC_DIR_NATIVE}" -I"${TOMMATH_DIR_NATIVE}" \ +CC_SWITCHES = -I"${BUILD_DIR}" -I"${GENERIC_DIR_NATIVE}" -I"${TOMMATH_DIR_NATIVE}" \ -I"${ZLIB_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \ ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} -DMP_PREC=4 \ ${AC_FLAGS} ${COMPILE_DEBUG_FLAGS} ${NO_DEPRECATED_FLAGS} |
