Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0df63a1635a5890a605393f97d737af84e5a49f8
Ticket: 1960703fffffffffffffffffffffffffffffffff
Chaining mixins fails
User & Date: pertronic on 2008-05-09 03:50:50
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    In the following testcase I expect A's method egg to be called.  However it fails with error 
    "unknown method "egg": must be bar, destroy, egg, eval, ..."
    while executing
    "my egg"
        (class "::B" method "bar" line 3)
        invoked from within
    "my bar"
        (class "::C" method "foo" line 3)
        invoked from within
    "$o foo"
        (file "oo_bug2.tcl" line 27)
    
    Note: the method name egg is displayed as being a known method.
    
    package require TclOO
    namespace import oo::*
    
    # using TclOO 0.2 with Tcl 8.5.2
    
    class create A {
    method egg {} {
    }
    }
    
    class create B {
    method bar {} {
    # mixin from A: fails
    my egg
    }
    }
    
    class create C {
    method foo {} {
    # mixin from B
    my bar
    }
    }
    
    define B mixin A
    define C mixin B
    
    set o [C new]
    $o foo
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "pertronic"
  10. subsystem changed to: "35. TclOO Package"
  11. title changed to: "Chaining mixins fails"
  12. type changed to: "Bug"