summaryrefslogtreecommitdiffstats
path: root/tests/ooUtil.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2023-11-13 14:16:41 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2023-11-13 14:16:41 (GMT)
commit323c70e2f7d531aa7305d0ffaa3b9ed3087ea178 (patch)
treee34f7ff6d0f7fb8cfb91b0ad3a3e87cf51d01293 /tests/ooUtil.test
parentf60bcc7e1e3aa3950d481d08d057361da75ee3cf (diff)
downloadtcl-323c70e2f7d531aa7305d0ffaa3b9ed3087ea178.zip
tcl-323c70e2f7d531aa7305d0ffaa3b9ed3087ea178.tar.gz
tcl-323c70e2f7d531aa7305d0ffaa3b9ed3087ea178.tar.bz2
Remnants from TIP 567's implementation. The feature was done ages ago.
Diffstat (limited to 'tests/ooUtil.test')
-rw-r--r--tests/ooUtil.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ooUtil.test b/tests/ooUtil.test
index f41c668..9e1de8f 100644
--- a/tests/ooUtil.test
+++ b/tests/ooUtil.test
@@ -527,6 +527,29 @@ test ooUtil-7.2 {TIP 478: link removed when [my] disappears} -setup {
parent destroy
} -result {{in foo of ::o} {in foo of ::o} {} 1 {invalid command name "pqr"}}
+# Tests a very weird combination of things (with a key problem locus in
+# MixinClassDelegates) that TIP 567 fixes
+test ooUtil-8.1 {TIP 567: call oo::define twice from metaclass constructor} -setup {
+ oo::class create parent
+} -body {
+ ::oo::class create A {
+ superclass parent
+ }
+ ::oo::class create B {
+ superclass ::oo::class parent
+ constructor {{definitionScript ""}} {
+ next $definitionScript
+ next {superclass ::A}
+ }
+ }
+ B create C {
+ superclass A
+ }
+ C create instance
+} -cleanup {
+ parent destroy
+} -result ::instance
+
# Tests that verify issues detected with the tcllib version of the code
test ooUtil-tcllib-ticket-b3577ed586 {test scoping of delegation in oo::class.Delegate } -setup {
oo::class create animal {}