Skip to content
Tcl Source Code History Of Ticket 29aa1c7b13a6c044
Login

History Of Ticket 29aa1c7b13a6c044

Artifacts Associated With Ticket 29aa1c7b13a6c044

  1. Ticket change [f2b38e2b72] (rid 164656) by stu on 2018-07-17 19:15:02:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      It's also possible that I don't understand what I'm doing.
      
      oo::class create A {destructor {puts a;catch {next}}}
      oo::class create B {destructor {puts b};mixin A}
      oo::class create C {destructor {puts c}}
      foreach i {a b c} {set $i [[string totitle $i] new]}
      oo::objdefine $c mixin -append A
      foreach i {a b c} {puts $i:;[set $i] destroy}
      
      In the output I expect to see:
      c:
      a
      c
      
    5. foundin initialized to: "current"
    6. is_private initialized to: "0"
    7. login: "stu"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "36034badbf4fa68e1e6f55bc81729916152660a8"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "stu"
    14. subsystem initialized to: "10. Objects"
    15. title initialized to: "Mixed-in destructors aren't called"
    16. type initialized to: "Bug"
  2. Ticket change [1224c1fd3e] (rid 164659) by aspect on 2018-07-19 09:03:30:

    1. icomment:
      Simpler example:
      
      oo::class create A {destructor {puts a;next}}
      oo::class create C {destructor {puts c}}
      
      C create c
      oo::objdefine c mixin -append A
      c destroy
      
      # output: c
      
      The destructor defined in A is never called.  This seems suspicious .. though
      note a constructor defined in A will never be called, so maybe it's correct by
      symmetry.  Should be documented and covered with a test either way.
      
      Note that you can achieve the desired effect a different way:
      
      oo::define A method destroy {} {puts aa; next}
      
    2. login: "aspect"
    3. mimetype: "text/plain"