From acd32d6e7090b829a7d5e1aec2e6b09f987aaccc Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 10 Jul 2013 16:43:01 +0000 Subject: Next attempt. Appears to have uncovered a bug. --- generic/tclCompCmds.c | 2 +- tests/info.test | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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 -- cgit v0.12