Index: TODO =================================================================== diff -u -re979a7fbb725c874f4900258e7537aaf29c0fbae -r2ca66aec9ed16d36076d6b9c959642ee13d08647 --- TODO (.../TODO) (revision e979a7fbb725c874f4900258e7537aaf29c0fbae) +++ TODO (.../TODO) (revision 2ca66aec9ed16d36076d6b9c959642ee13d08647) @@ -2191,6 +2191,7 @@ - xotcl2.tcl: defined ::xotcl::MetaSlot - make sure, that classes of the intrinsic class hierarchy are of the same object system +- add regression test TODO: - doc: Index: tests/contains.test =================================================================== diff -u -ra16377a1a6ba5a51fa50b775312c066f3ba5e8fc -r2ca66aec9ed16d36076d6b9c959642ee13d08647 --- tests/contains.test (.../contains.test) (revision a16377a1a6ba5a51fa50b775312c066f3ba5e8fc) +++ tests/contains.test (.../contains.test) (revision 2ca66aec9ed16d36076d6b9c959642ee13d08647) @@ -104,4 +104,25 @@ package forget XOTcl package require XOTcl +######################################################################## +# +# Test that we do not allow to mix object systems within the intrinsic +# classes of an object. Otherwise we would have problems with the +# recreate "C0 create c0". On a recreate of c0 the object system for +# C0 is ::xotcl, therefore we try to call recreate. In the C0 class +# hierarchy is from nx and contains no "recreate" method. + +# trigger the call of "cleanup" to work via method dispatch +::xotcl::Object create o1 +o1 proc cleanup {} {return} + +? {catch {::xotcl::Class create C0 -superclass ::nx::Object} errorMsg} 1 +? {set ::errorMsg} {class "::C0" has different object system as class "::nx::Object"} +::nx::Class create C1 -superclass ::nx::Object + +#C0 create c0 +#C0 create c0 +C1 create c1 +C1 create c1 + #puts stderr ===EXIT \ No newline at end of file