Skip to content
Tcl Source Code History Of Ticket 2791586fffffffff
Login

History Of Ticket 2791586fffffffff

Artifacts Associated With Ticket 2791586fffffffff

  1. Ticket change [06857c01c9] (rid 89239) by dkf on 2009-05-14 08:38:42:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Something very odd is going on when you do [tailcall next]. Of course, it's an inherently odd thing to do anyway, but in that case it ought to error out in a sane way (similar to the way that [uplevel 1 next] is prohibited). This is not an issue for the standalone TclOO package.
      
      % oo::class create foo {method bar {} {puts barbar}}
      ::foo
      % foo create o
      ::o
      % oo::objdefine o method bar {} {puts 1;tailcall next;puts 2}
      % o bar
      1
      next may only be called from inside a method
      % oo::objdefine o method foo {} {puts A;my bar;puts B}
      % o foo
      A
      1
      no next method implementation
      % set errorInfo
      no next method implementation
          while executing
      "next"
          invoked from within
      "my bar"
          (object "::o" method "foo" line 1)
          invoked from within
      "o foo"
      
      
    4. foundin initialized to: "obsolete: 8.6b1.1"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dkf"
    10. subsystem initialized to: "35. TclOO Package"
    11. title initialized to: "[tailcall next] weirdness"
    12. type initialized to: "Bug"
  2. Ticket change [6c0e6d10f9] (rid 128434) by dkf on 2009-05-14 15:39:23:

    1. priority changed to: "9 Immediate"
  3. Ticket change [26c8fc18cf] (rid 88410) by dkf on 2009-05-22 04:34:25:

    1. icomment:
      OK, within methods it's odd but somewhat plausible.
      
      Within constructors and destructors... eep!
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [21b3218535] (rid 130628) by dkf on 2009-06-08 20:57:42:

    1. icomment:
      within constructors, things can get odd but are at least logical...
      
      % oo::class create foo {constructor {} {puts foo:con};method foo {} {puts foo:foo}}
      ::foo
      % oo::class create bar {superclass foo; constructor {} {puts a;tailcall next;puts b};method foo {} {puts c;tailcall next;puts d}}
      ::bar
      % oo::class create boo {superclass bar; constructor {} {puts p;next;puts q}}
      ::boo
      % bar create 2
      a
      next may only be called from inside a method
      % boo create 3
      p
      a
      a
      a
      a
      a
      a
      a
      [ad infinitum]
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  5. Ticket change [96bebaf7d4] (rid 106376) by dkf on 2009-06-08 21:03:32:

    1. icomment:
      moreover, with this test you can see that everything is processed correctly for constructors
      
      % oo::class create foo {constructor {} {puts foo:con};method foo {} {puts foo:foo}}
      ::foo
      % oo::class create bar {superclass foo; constructor {} {puts a; tailcall next; puts b};method foo {} {puts c; tailcall next; puts d}}
      ::bar
      % oo::class create spong {superclass foo; constructor {} next; method foo {} {bar create ::z}}     
      ::spong
      % spong create x
      foo:con
      ::x
      % x foo
      a
      foo:foo
      ::z
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  6. Ticket change [4037627316] (rid 121597) by dkf on 2009-06-08 21:17:26:

    1. icomment:
      (well; "correct" is still bizarre, but at least we're not crashing or losing objects)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Ticket change [c8f9b17e57] (rid 122203) by dkf on 2009-06-08 21:27:17:

    1. closedate changed to: "2009-06-08T14:27:17"
    2. closer changed to: "dkf"
    3. icomment:
      
      
      allow_comments - 1
      
      destructors similarly work sanely (well, within the bounds of sanity as defined in this odd context):
      
      % oo::class create a {destructor {puts dead:a}}
      % oo::class create b {destructor {puts dead:b1;next;puts dead:b2};superclass a}
      % oo::class create c {destructor {puts dead:c1;next;tailcall next;puts dead:c2};superclass b}
      % oo::class create d {destructor {puts dead:d1;next;puts dead:d2};superclass c}
      % d create e
      % e destroy
      dead:d1
      dead:c1
      dead:b1
      dead:a
      dead:b2
      dead:c1
      dead:b1
      dead:a
      [...]
      
      Ergo, not actually a bug in this area. Just a massive load of oddness.
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Works For Me"
    7. status changed to: "Closed"
    8. username: "dkf"