diff options
-rw-r--r-- | generic/tclCompCmds.c | 2 | ||||
-rw-r--r-- | tests/dict.test | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 348910c..51a566e 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -1159,7 +1159,7 @@ TclCompileDictUpdateCmd( infoIndex = TclCreateAuxData(duiPtr, &tclDictUpdateInfoType, envPtr); for (i=0 ; i<numVars ; i++) { - CompileWord(envPtr, keyTokenPtrs[i], interp, i); + CompileWord(envPtr, keyTokenPtrs[i], interp, 2*i+2); } TclEmitInstInt4( INST_LIST, numVars, envPtr); TclEmitInstInt4( INST_DICT_UPDATE_START, dictIndex, envPtr); diff --git a/tests/dict.test b/tests/dict.test index bd7b920..7b584e8 100644 --- a/tests/dict.test +++ b/tests/dict.test @@ -1271,6 +1271,12 @@ test dict-23.7 {CompileWord OBOE} { } {} }} [linenumber] } 2 +test dict-23.8 {CompileWord OBOE} { + apply {n { + dict update foo {*}{ + } [return [incr n -[linenumber]]] x {} + }} [linenumber] +} 1 rename linenumber {} |