| Ticket UUID: | c0bc269178df938974e19cbe60e69fc0e711da5 | ||
| Title: | switch -regexp -matchvar -indexvar broken when optional subexpression does not match | ||
| Type: | Bug | Created on: | 2022-09-20 18:40:42 |
| Submitter: | apnadkarni | Assigned to: | jan.nijtmans |
| Subsystem: | 18. Commands M-Z | Severity: | Minor |
| Priority: | 7 High | Last modified: | 2022-09-21 13:15:16 |
| Status: | Closed | Closed by: | jan.nijtmans |
| Resolution: | Fixed | Closed on: | 2022-09-21 13:15:16 |
| Version: | 8.6.13 | ||
| Description: | ||||
|
The third element of m below should be the empty string as the (b)? is not matched.
core-8-6-branch also exhibits this bug. However, 8.6.12 shows correct behavior
So clearly something was broken post-8.6.12 release. | ||||
| User Comments: | ||||
apnadkarni added on 2022-09-20 18:50:44:
dgp added on 2022-09-20 19:06:49:
How did Tcl behave in release 8.6.10 ? See TIP 623 for more background. jan.nijtmans added on 2022-09-20 20:44:39:
Proposed fix [ea165f0333f93885|here] Thanks for the report, and for the testcase! jan.nijtmans added on 2022-09-21 13:15:16:
Fix committed [92ab43ecd6cdd9a4|here] | ||||
