When a destructor error occurs, the object becomes corrupted. For example:
package require Itcl itcl::class Temp { private variable a destructor { error destructor } public method A {} { set a 0 ;# <-------- fails puts "a = $a" } } set obj [Temp #auto] catch {itcl::delete object $obj} $obj A
In Itcl 3.4, this prints:
a = 0
In Itcl 4.0.3, it generates the error:
can't set "a": upvar refers to variable in deleted namespace
Confirmed. Suspect it's another symptom of the overall
design botch of implementing variables as references to
a ....::internal::.... namespace.
fixed on trunk