Chaining mixins fails
Closed / Fixed1960703fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 19 years ago
Descriptionplain2008-05-09 03:50:50
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
dkfplain2008-05-11 17:36:38
Logged In: YES user_id=79902 Originator: NO Confirmed with HEAD. Doubly serious because it is inconsistent with the error message!
dkf Ticket [1960703fff]: 1 change
[History diff]2008-05-11 17:36:39
dkfplain2008-05-11 23:23:36
Logged In: YES user_id=79902 Originator: NO Now fixed
dkf Closed ticket [1960703fff].
[History diff]2008-05-11 23:23:37
Log in (anonymous is fine) to add a comment.