Overview
| Artifact ID: | f9ac72c09841010b92c255a5cca00521c8992af8 |
|---|---|
| Ticket: | b9e1a3032eb1fb7811996bcbdddbeaa8004c589a
TclOO method lookup chooses object method over class mixin method |
| User & Date: | apnadkarni on 2014-07-22 03:39:29 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed 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 - foundin changed to: "8.6.0"
- is_private changed to: "0"
- login: "apnadkarni"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "apnadkarni"
- subsystem changed to: "35. TclOO Package"
- title changed to:
TclOO method lookup chooses object method over class mixin method
- type changed to: "Bug"