Posted to tcl by aspect at Tue May 12 02:34:23 GMT 2015view raw

  1. test next-tailcall-simple-1 "self method" -body {
  2. oo::class create Foo {
  3. method bar {} {
  4. puts abc
  5. tailcall puts hi
  6. puts xyz
  7. }
  8. method baz {} {
  9. puts a
  10. my bar
  11. puts b
  12. }
  13. }
  14. [Foo create foo] bar
  15. } -cleanup {
  16. rename Foo {}
  17. } -output [join {a abc hi b} \n]\n
  18.  
  19. # ---- Output was:
  20. # abc
  21. # hi
  22. #
  23. # ---- Output should have been (exact matching):
  24. # a
  25. # abc
  26. # hi
  27. # b
  28.  
  29. # replace "my" with [string cat my] for success