Index: tests/parameters.test =================================================================== diff -u -r5ce68a42506fcc981cea2431afa1b09b476e667a -r770232a210b63fdafc5e5e4a2caf45fa5097c6fe --- tests/parameters.test (.../parameters.test) (revision 5ce68a42506fcc981cea2431afa1b09b476e667a) +++ tests/parameters.test (.../parameters.test) (revision 770232a210b63fdafc5e5e4a2caf45fa5097c6fe) @@ -2460,4 +2460,27 @@ } +# +# Test interaction of name of property with the Tcl command behavior. +# Without the SlotContainerCmdResolver() the call to "list" in a +# property named "list" leads to a call to the container object +# ::Test2::slot::list instead of the intended ::list. +# +nx::Test case slot-container-name-interaction { + nx::Class create Test2 { + :property list { + :public method assign { obj var val } { + nsf::var::set $obj $var [list $obj $var $val] + } + :method unknown { val obj var args } { + return unknown + } + } + } + + ? {Test2 create t2} ::t2 + ? {t2 list 3} {::t2 list 3} + ? {t2 list} {::t2 list 3} + ? {t2 list this should call unknown} "unknown" +} \ No newline at end of file