Index: tests/methods.test =================================================================== diff -u -ra5e4ab3a3f85b51e855adb3fe981833c2534ee8b -r5c464365425434543edd13f1674e1dd2d7f17a71 --- tests/methods.test (.../methods.test) (revision a5e4ab3a3f85b51e855adb3fe981833c2534ee8b) +++ tests/methods.test (.../methods.test) (revision 5c464365425434543edd13f1674e1dd2d7f17a71) @@ -412,6 +412,7 @@ # the other methods don't require them as strong :forward b ::o2 bar :method foo {} {return [self]} + :alias x ::o::foo } nx::Object create o2 { :public method bar {} {return [self]} @@ -420,5 +421,11 @@ # dispatch methods without current object ? ::o::a "Method ::o::a not dispatched on valid object" ? ::o::b "::o2" - ? ::o::foo "No current object" + ? ::o::foo "No current object; command called outside the context of a Next Scripting method" + ? ::o::x "Method x not dispatched on valid object ; don't call aliased methods via namespace paths!" + # make a regular call, provide tcd->object with a value + ? {::o x} "::o" + # check, if missing object is still detected + ? ::o::x "Method x not dispatched on valid object ; don't call aliased methods via namespace paths!" + ? self "No current object; command called outside the context of a Next Scripting method" } \ No newline at end of file