summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-10 16:43:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-10 16:43:01 (GMT)
commitacd32d6e7090b829a7d5e1aec2e6b09f987aaccc (patch)
treea2f7c0d0d95b1a20e0c32dc3bff0a88ad2b56fd9
parent55deb86ee331985bbfedb4d5211968c4dbe1decd (diff)
downloadtcl-acd32d6e7090b829a7d5e1aec2e6b09f987aaccc.zip
tcl-acd32d6e7090b829a7d5e1aec2e6b09f987aaccc.tar.gz
tcl-acd32d6e7090b829a7d5e1aec2e6b09f987aaccc.tar.bz2
Next attempt. Appears to have uncovered a bug.
-rw-r--r--generic/tclCompCmds.c2
-rw-r--r--tests/info.test14
2 files changed, 15 insertions, 1 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 7ed9006..13318a3 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -1467,7 +1467,7 @@ CompileDictEachCmd(
* Compile the loop body itself. It should be stack-neutral.
*/
- SetLineInformation(3);
+ LineInformation(3);
CompileBody(envPtr, bodyTokenPtr, interp);
if (collect == TCL_EACH_COLLECT) {
Emit14Inst( INST_LOAD_SCALAR, keyVarIndex, envPtr);
diff --git a/tests/info.test b/tests/info.test
index a1d3b1a..ba31159 100644
--- a/tests/info.test
+++ b/tests/info.test
@@ -1977,6 +1977,20 @@ test info-33.4 {{*}, literal, simple, bytecompiled} -body {
} -result {type source line 1968 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
+namespace eval foo {}
+proc foo::bar {} {
+ dict for {a b} {c d} {*}{
+ {set res [info frame 0]}
+ }
+ return $res
+}
+test info-33.5 {{*}, literal, simple, bytecompiled} -body {
+ reduce [foo::bar]
+} -cleanup {
+ namespace delete foo
+} -result {type source line 1983 file info.test cmd {info frame 0} proc ::foo::bar level 0}
+
+# -------------------------------------------------------------------------
unset -nocomplain res
# cleanup