#3845 absolute uplevel can fail when nested in relative uplevel

obsolete: 8.5b2
closed-invalid
5
2007-11-17
2007-11-17
No

NOTE: This bug applies to both 8.4.x and HEAD.

proc a { a } {
puts stdout [info level]; # 1
b $a
}

proc b { b } {
puts stdout [info level]; # 2

uplevel 1 {
puts stdout [info level]; # 1

uplevel 1 {
puts stdout [info level]; #0

uplevel #0 {
puts stdout [info level]; #0
}

uplevel #1 {
# this raises an error when it should not.
puts stdout [info level]; # 1
}

uplevel #2 {
# this raises an error when it should not.
puts stdout [info level]; # 2
}
}
}
}

a 2

Discussion

  • miguel sofer

    miguel sofer - 2007-11-17

    Logged In: YES
    user_id=148712
    Originator: NO

    That is the correct behaviour, per design and docs:
    "The uplevel command causes the invoking procedure to disappear from the procedure calling stack while the command is being executed."

     
  • miguel sofer

    miguel sofer - 2007-11-17
    • status: open --> closed-invalid
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks