Overview
| Artifact ID: | 25cd11e7d1a0b6bc50a24c3faf1dc8d3fe44bd7d |
|---|---|
| Ticket: | 2704302fffffffffffffffffffffffffffffffff
Incorrect return value from self class |
| User & Date: | abstractsig on 2009-03-23 16:31:49 |
Changes
- icomment:
My logic is that the 'self class' return value should be consistent with the 'info object class' return value; a different return creates an ambiguity as to what the object's class is? The 'oo::objdefine [self] class $new' definitely changes the class of self. In this example the behaviour of self after 'oo::objdefine [self] class $new' is ::B not ::A. package require TclOO namespace path ::oo class create A { method change_class {new} { oo::objdefine [self] class $new my change_class foo list [self class] [info object class [self]] } } class create B { method change_class {new} { puts $new } } set o [A new] puts [$o change_class B] - login: "abstractsig"
- mimetype: "text/plain"
- username: "abstractsig"