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

  1.  
  2. catch {namespace delete t1}
  3. namespace eval t1 {
  4. oo::class create Foo {
  5. method five {} {
  6. tailcall puts 2
  7. }
  8. }
  9. oo::class create Unfoo {
  10. superclass Foo
  11. method five {} {
  12. puts 1
  13. next
  14. puts 3
  15. }
  16. }
  17. Unfoo create fu
  18. fu five
  19. # 1
  20. # 3
  21. # 2
  22. }
  23.