TclOO variable oddity
Closed / Fixed74b61102041a3737878be86184c9b93219cec1f4Created 2 years agoUpdated 2 years ago
Descriptionplain2024-06-10 23:58:20
TclOO [varname] method creates a ghost variable.
% set o [oo::object new]
::oo::Obj93
% ${o}::my varname foo
::oo::Obj93::foo
% namespace which -variable ${o}::foo
::oo::Obj93::foo
% info exists ${o}::foo
0
% namespace which -variable ${o}::foo
%
Referenced by4
eb9b8cb169Merge [85ca3926aa1f2f6c]: Stop variable from disappearing by accident when referred to by name. [74b6110204]. check-in2024-08-30 18:54:5185ca3926aaStop variable from disappearing by accident when referred to by name. [74b6110204] check-in2024-07-14 20:07:13b10dcf68c9Stop variable from disappearing by accident when referred to by name. [74b6110204] check-in2024-07-14 20:06:39d9ed9b1384Stop variable from disappearing by accident when referred to by name. [74b6110204] check-in2024-07-14 19:52:41
emiliano Ticket [74b6110204]: 4 changes
[History diff]2024-06-11 00:04:31
dkfmarkdown2024-06-26 15:36:42
Hmm, the call to info exists shouldn't make it vanish.
Confirmed with 8.7 and 8.6 as well. Which I'd expect; the code hasn't changed in this area.
dkfmarkdown2024-07-14 19:55:35
Examination of the source to variable convinced me that I was just missing a conditional bump of a reference count. Fixed for 8.6; will feed forward to other branches.
Log in (anonymous is fine) to add a comment.