diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-08-02 20:19:44 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-08-02 20:19:44 (GMT) |
commit | 0958b92b37ecfab151eeda74295706cdb6351e77 (patch) | |
tree | 1385968014ba13306c9c262b6c09ad5ae34e39d3 /tests/oo.test | |
parent | 6d9ae4aa1654e9872e141608b90a7c58ea4235cc (diff) | |
download | tcl-0958b92b37ecfab151eeda74295706cdb6351e77.zip tcl-0958b92b37ecfab151eeda74295706cdb6351e77.tar.gz tcl-0958b92b37ecfab151eeda74295706cdb6351e77.tar.bz2 |
Deal with the elaborate rip-apart-a-metaclass case as well.
Diffstat (limited to 'tests/oo.test')
-rw-r--r-- | tests/oo.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/oo.test b/tests/oo.test index 6f16a8d..6d38f71 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -3391,6 +3391,25 @@ test oo-35.1 {Bug 9d61624b3d: Empty superclass must not cause crash} -setup { unset -nocomplain result fruit destroy } -result {::apple ::oo::object ::oo::object 1 {{method destroy ::oo::object {core method: "destroy"}}} 1} +test oo-35.2 {Bug 9d61624b3d: Empty superclass must not cause crash} -setup { + oo::class create fruitMetaclass { + superclass oo::class + method eat {} {} + } + set result {} +} -body { + lappend result [fruitMetaclass create ::appleClass] \ + [appleClass create orange] \ + [info class superclasses fruitMetaclass] + oo::define fruitMetaclass superclass + lappend result [info class superclasses fruitMetaclass] \ + [info object class appleClass oo::class] \ + [catch { orange }] [info object class orange] \ + [appleClass create pear] +} -cleanup { + unset -nocomplain result + fruitMetaclass destroy +} -result {::appleClass ::orange ::oo::class ::oo::class 1 1 ::appleClass ::pear} cleanupTests return |