Artifacts Associated With Ticket 2791586fffffffffffffffffffffffffffffffff
Ticket change [06857c01c9] (rid 89239) by dkf on 2009-05-14 08:38:42:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- 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" - foundin initialized to: "obsolete: 8.6b1.1"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dkf"
- subsystem initialized to: "35. TclOO Package"
- title initialized to: "[tailcall next] weirdness"
- type initialized to: "Bug"
Ticket change [6c0e6d10f9] (rid 128434) by dkf on 2009-05-14 15:39:23:
- priority changed to: "9 Immediate"
Ticket change [26c8fc18cf] (rid 88410) by dkf on 2009-05-22 04:34:25:
- icomment:
OK, within methods it's odd but somewhat plausible. Within constructors and destructors... eep!
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [21b3218535] (rid 130628) by dkf on 2009-06-08 20:57:42:
- 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] - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [96bebaf7d4] (rid 106376) by dkf on 2009-06-08 21:03:32:
- 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 - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [4037627316] (rid 121597) by dkf on 2009-06-08 21:17:26:
- icomment:
(well; "correct" is still bizarre, but at least we're not crashing or losing objects)
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [c8f9b17e57] (rid 122203) by dkf on 2009-06-08 21:27:17:
- closedate changed to: "2009-06-08T14:27:17"
- closer changed to: "dkf"
- 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. - login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Works For Me"
- status changed to: "Closed"
- username: "dkf"