summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-19 14:55:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-19 14:55:05 (GMT)
commit58c74e141ff1c65580defe7237e86826b15afea2 (patch)
tree72982e02e035e339a64bfe9363651054e062a018
parent08f3edbacbd40f9f76fb9e002b49516a5ffc3c62 (diff)
downloadtcl-58c74e141ff1c65580defe7237e86826b15afea2.zip
tcl-58c74e141ff1c65580defe7237e86826b15afea2.tar.gz
tcl-58c74e141ff1c65580defe7237e86826b15afea2.tar.bz2
Line numbers wrong in compiled [dict for].
-rw-r--r--generic/tclCompCmds.c2
-rw-r--r--tests/dict.test6
2 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index efb7ff2..348910c 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -934,7 +934,7 @@ TclCompileDictForCmd(
* errors at this point.
*/
- CompileWord(envPtr, dictTokenPtr, interp, 3);
+ CompileWord(envPtr, dictTokenPtr, interp, 2);
TclEmitInstInt4( INST_DICT_FIRST, infoIndex, envPtr);
emptyTargetOffset = CurrentOffset(envPtr);
TclEmitInstInt4( INST_JUMP_TRUE4, 0, envPtr);
diff --git a/tests/dict.test b/tests/dict.test
index 149599b..bd7b920 100644
--- a/tests/dict.test
+++ b/tests/dict.test
@@ -1265,6 +1265,12 @@ test dict-23.6 {CompileWord OBOE} {
} [return [incr n -[linenumber]]]
}} [linenumber]
} 1
+test dict-23.7 {CompileWord OBOE} {
+ apply {n {
+ dict for {a b} [return [incr n -[linenumber]]] {*}{
+ } {}
+ }} [linenumber]
+} 2
rename linenumber {}