Posted to tcl by kbk at Wed Oct 22 17:18:23 GMT 2008view raw

  1. oo::class create a {
  2. constructor {} {}
  3. }
  4.  
  5. oo::class create b {
  6. superclass a
  7. constructor {} {next}
  8. }
  9. b create c
  10. ----
  11. no next constructor implementation
  12. while executing
  13. "next"
  14. (class "::b" constructor line 1)
  15. invoked from within
  16. "b create c"
  17. (file "/home/kennykb/tmp/oops" line 9)

Comments

Posted by dkf at Thu Oct 23 06:09:31 GMT 2008 [text] [code]

Bleah, you've run afoul of the "delete a constructor" code.

Posted by dkf at Thu Oct 23 11:16:30 GMT 2008 [text] [code]

And this is how it is documented to behave. See the final sentence of the bit on constructors at http://www.tcl.tk/man/tcl8.6/TclCmd/define.htm#M6