Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-08-30
18:54
Merge [85ca3926aa1f2f6c]: Stop variable from disappearing by accident when referred to by name. [74... check-in: eb9b8cb169 user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE
2024-07-14
20:07
Stop variable from disappearing by accident when referred to by name. [74b6110204] check-in: 85ca3926aa user: dkf tags: trunk, main
20:06
Stop variable from disappearing by accident when referred to by name. [74b6110204] check-in: b10dcf68c9 user: dkf tags: core-8-branch
19:55 • Closed ticket [74b6110204]: TclOO variable oddity plus 6 other changes artifact: 8c9745405a user: dkf
19:52
Stop variable from disappearing by accident when referred to by name. [74b6110204] check-in: d9ed9b1384 user: dkf tags: core-8-6-branch
2024-06-26
15:36 • Ticket [74b6110204] TclOO variable oddity status still Open with 3 other cha... artifact: daf64c8d54 user: dkf
2024-06-11
00:04 • Ticket [74b6110204]: 4 changes artifact: 1157e18b5c user: emiliano
2024-06-10
23:58 • New ticket [74b6110204]. artifact: 7c1bc5b7fa user: emiliano

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.