Index: tests/returns.test =================================================================== diff -u -r6edd8aa86d66687dcfa2c60460de6e9b41ee0051 -re75f57c39bdc5455b65317013ed58d2db8d22dbd --- tests/returns.test (.../returns.test) (revision 6edd8aa86d66687dcfa2c60460de6e9b41ee0051) +++ tests/returns.test (.../returns.test) (revision e75f57c39bdc5455b65317013ed58d2db8d22dbd) @@ -350,4 +350,18 @@ ? {::nsf::methodproperty C lappend returns} "" ? {::nsf::methodproperty ::nx::Object method returns} "" +} + +Test case empty-paramdefs-robustedness { + ::nx::Object create ku { + # Condition 1: An empty or checker-free parameter spec! + :method foo {} {;} + # Condition 2: A call to ::nsf::methodproperty which acquires a + # NsfParamDefs + ::nsf::methodproperty [::nx::current] foo returns; # a returns query + # At this point, we find a NsfParamDefs structure with an empty set + # of params! Subsequent references to paramDefs->paramsPtr in + # e.g. ListCmdParams() would crash ... if not trapped appropriately. + ? [list [::nx::current] info method parameter foo] ""; # boom! + } } \ No newline at end of file