Index: tests/destroy.test =================================================================== diff -u -N -reae784ccc80b2a18b83fbe631c32d549189f7927 -rb053832535f9d1903fc0c0c3cb3523653bd63dfe --- tests/destroy.test (.../destroy.test) (revision eae784ccc80b2a18b83fbe631c32d549189f7927) +++ tests/destroy.test (.../destroy.test) (revision b053832535f9d1903fc0c0c3cb3523653bd63dfe) @@ -616,6 +616,7 @@ ::module destroy } + # to avoid CallDirectly, we could activate this line ::nx::Class create M {:method dealloc args {next}} Test case delete-parent-namespace-dealloc @@ -972,4 +973,23 @@ # We expect that the original method works again. # ? {string match ::nsf::__#* [A new]} 1 -} \ No newline at end of file +} + +# +# Create a cyclical class dependency and delete it manually +# +nx::Test case cyclical-dependency { + nx::Object create o1 + ? {nx::Class create o1::C} ::o1::C + ? {nsf::relation o1 class o1::C} ::o1::C + o1 destroy +} + +# +# Create a cyclical class dependency and let it be deleted on +# object-system-cleanup +# +nx::Object create o1 +nx::Class create o1::C +nsf::relation o1 class o1::C +