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 | ed2e06d4526c12d6cb4c559b6746216396ca4a10 (patch) | |
tree | 1385968014ba13306c9c262b6c09ad5ae34e39d3 /tests | |
parent | 6af366a7dcf18d187e53d5e58264b34675b31d22 (diff) | |
download | tcl-ed2e06d4526c12d6cb4c559b6746216396ca4a10.zip tcl-ed2e06d4526c12d6cb4c559b6746216396ca4a10.tar.gz tcl-ed2e06d4526c12d6cb4c559b6746216396ca4a10.tar.bz2 |
Deal with the elaborate rip-apart-a-metaclass case as well.
Diffstat (limited to 'tests')
-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 |