Skip to content
Tcl Source Code History Of Ticket b9e1a3032e
Login

History Of Ticket b9e1a3032e

Artifacts Associated With Ticket b9e1a3032e

  1. Ticket change [f9ac72c098] (rid 138916) by apnadkarni on 2014-07-22 03:39:29:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      The manpage for [next] states in the Method Search Order section that methods defined in classes mixed into classes of an object are searched before methods defined for the object. The following sample seems to show otherwise.
      
      oo::class create ClassMixin {
        method m {} {puts ClassMixin; next}
      }
      oo::class create ObjMixin {
        method m {} {puts ObjMixin; next}
      }
      oo::class create C {
        mixin ClassMixin
        method m {} {puts C}
      }
      
      (tcl) 82 % C create o
      ::o
      (tcl) 83 % oo::objdefine o {mixin ObjMixin}
      (tcl) 84 % info object call o m
      {method m ::ObjMixin method} {method m ::ClassMixin method} {method m ::C method}
      (tcl) 85 % oo::objdefine o {method m {} {puts object; next}}
      (tcl) 86 % o m
      ObjMixin
      object
      ClassMixin
      C
      (tcl) 87 % info object call o m
      {method m ::ObjMixin method} {method m object method} {method m ::ClassMixin method} {method m ::C method}
      
      Again, not sure if the bug is in the docs or the implementation
      
    5. foundin initialized to: "8.6.0"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "apnadkarni"
    13. subsystem initialized to: "35. TclOO Package"
    14. title initialized to:
      TclOO method lookup chooses object method over class mixin method
      
    15. type initialized to: "Bug"
  2. Ticket change [7deb65b37e] (rid 139042) by apnadkarni on 2014-07-31 14:15:41:

    1. assignee changed to: "dkf"
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  3. Ticket change [e7ce7e78df] (rid 139295) by dkf on 2014-08-19 07:19:54:

    1. icomment:
      Oh, I remember this! Implementation bug (in the call chain builder) indeed. I can tell it has to be that way round, because otherwise there's no meaningful difference between class mixins and normal inheritance.
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. username: "dkf"
  4. Ticket change [07d32643ae] (rid 139296) by dkf on 2014-08-19 07:31:17:

    1. icomment:
      And looking at the code, I can remember why I didn't get this right. Figuring out what should happen when you've got a class mixed into a class that is inherited by a class mixed into a class that we've instantiated (eek!) makes my head hurt.
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. username: "dkf"
  5. Ticket change [42bd6ab9fb] (rid 139297) by dkf on 2014-08-19 07:31:42:

    1. login: "dkf"
    2. mimetype: "text/plain"
    3. priority changed to: "8"
  6. Ticket change [d487b4975d] (rid 139390) by dkf on 2014-08-28 07:58:17:

    1. closedate changed to: "2456897.83215008"
    2. closer changed to: "dkf"
    3. icomment:
      This should now be fixed. (The code to fix it is actually a fairly simple double traversal with flags tracking what we've seen, <i>except</i> for the case where we're dealing with filters in mixins, which is a bit brain-boggling.) Aggressive user testing encouraged.
      
    4. login: "dkf"
    5. mimetype: "text/html"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"