The following script behaves differently in Itcl 3.4 and 4.0.3:
package require Itcl namespace import itcl::* class A { constructor {} { puts [uplevel namespace current] } } class B { inherit A constructor {} {} } B #auto
In Itcl 3.4, it displays:
In Itcl 4.0.3, it displays:
Are those results supposed to be blank?
Trying for myself I see that Itcl 3 thinks the uplevel namespace is ::B
While Itcl 4 thinks it is ::
This does not appear to be a recent change.
That is correct. SF deleted the results for some reason.
In Itcl 3, compare with:
We seem to need a constructor in the derived class
to get that class namespace to show up in the uplevel.
Any chance we can call this a bug in Itcl 3, fixed in Itcl 4?
Or is this an important detail that scripts rely on?
Found a fix that works interactively, but not in a test suite(?!?!)
Exploring that is finding more bugs.
This matter is part of constructor invocation, and is
closely related to
http://core.tcl.tk/itcl/tktview?name=ec215db901
The same reform will likely fix both problems.