Posted to tcl by stu at Mon Jul 16 20:06:18 GMT 2018view raw

  1. oo::class create A {destructor {puts a;catch {next}}}
  2. oo::class create B {destructor {puts b};mixin A}
  3. oo::class create C {destructor {puts c}}
  4. foreach i {a b c} {set $i [[string totitle $i] new]}
  5. oo::objdefine $c mixin -append A
  6. foreach i {a b c} {puts $i:;[set $i] destroy}
  8. In the output I expect to see:
  9. c:
  10. a
  11. c