Posted to tcl by sebres at Thu Nov 14 16:42:16 GMT 2019view raw
- oo::class create c1 {
- method m1 {} {
- puts !!!!!c1::m1!!!!
- }
- }
- oo::class create c2 {
- superclass c1
- destructor {
- puts ===destructor=1=
- my m1
- puts ===destructor=2=
- }
- method m1 {} {
- puts ===delete-self***
- rename [self] {}
- puts ===no-self***
- next
- }
- }
- c2 create obj1
- obj1 m1
- 1)
- ===delete-self***
- ===destructor=1=
- ===delete-self***
- ===no-self***
- !!!!!c1::m1!!!!
- ===destructor=2=
- ===no-self***
- !!!!!c1::m1!!!!
- 2)
- ===delete-self***
- ===destructor=1=
- ===delete-self***
- ===no-self***
- !!!!!c1::m1!!!!
- ===destructor=2=
- ===no-self***
- no next method implementation
- while executing
- "next"
- (class "::c2" method "m1" line 5)
- invoked from within
- "obj1 m1"
- (file "e:/test-oo-sf" line 23)