Skip to content
Tcl Source Code View Ticket
Login

View Ticket

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
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.