Posted to tcl by dgp at Thu Jul 13 20:01:05 GMT 2017view pretty
% oo::class create B { variable b constructor {} {set b 2} } ::B % oo::class create D { superclass B method foo {} { puts "b is $b ([namespace which -variable b] in [namespace current])" } } ::D % D create d ::d % d foo can't read "b": no such variable