Posted to tcl by aspect at Wed Apr 08 14:01:48 GMT 2015view pretty

catch {namespace delete t1}
namespace eval t1 {
    oo::class create Foo {
        method five {} {
            tailcall puts 2
        }
    }
    oo::class create Unfoo {
        superclass Foo
        method five {} {
            puts 1
            next
            puts 3
        }
    }
    Unfoo create fu
    fu five
    # 1
    # 3
    # 2
}