Index: generic/nsf.c =================================================================== diff -u -r50d4fe25876215d2e71f39fa4e5fe7426dda4464 -rdc94a1f141b1c6a106d0ee142c9df2743ac82e67 --- generic/nsf.c (.../nsf.c) (revision 50d4fe25876215d2e71f39fa4e5fe7426dda4464) +++ generic/nsf.c (.../nsf.c) (revision dc94a1f141b1c6a106d0ee142c9df2743ac82e67) @@ -29089,7 +29089,7 @@ } else { char *errMsg = ObjStr(Tcl_GetObjResult(interp)); - if (*errMsg != '\0') { + if (*errMsg == '\0') { return NsfPrintError(interp, "invalid value constraints \"%s\"", ObjStr(paramObjPtr) ); } else { Index: tests/disposition.test =================================================================== diff -u -rc4f449cb353be812ba6502ef8e9587e87881f59b -rdc94a1f141b1c6a106d0ee142c9df2743ac82e67 --- tests/disposition.test (.../disposition.test) (revision c4f449cb353be812ba6502ef8e9587e87881f59b) +++ tests/disposition.test (.../disposition.test) (revision dc94a1f141b1c6a106d0ee142c9df2743ac82e67) @@ -47,7 +47,7 @@ # # Not applicable in parametercheck # - ? [list ::nsf::is $paramType $msg] "invalid value constraints \"$paramType\"" + ? [list ::nsf::is $paramType $msg] "invalid value constraints \"$paramType\": parameter option '$paramType' not allowed" } @@ -141,16 +141,10 @@ # # Without the sketched extension, one could use eval in a forwarder. # -puts stderr ===1 C setObjectParams {{{-multi-2:forward,method=eval %self %method}}} -puts stderr ===2a -set x [C new -multi-2 {X Y}] -puts stderr [$x eval {set :multi-2}] -puts stderr ===2b ? {[C new -multi-2 {X Y}] eval {set :multi-2}} \ "X Y" -puts stderr ===3 # # In the positional case, why is FOO not passed on as arg value to @@ -406,7 +400,8 @@ initcmd } { ::nsf::method::property R $methods(raz) returns $dispoSpec - ? {R raz} "invalid value constraints \"$dispoSpec\"" + set trueSpec [lindex $dispoSpec 0] + ? {R raz} "invalid value constraints \"$dispoSpec\": parameter option '$trueSpec' not allowed" } Index: tests/parameters.test =================================================================== diff -u -rb6fa800493538a2f179224f7f1717eb70913dd8b -rdc94a1f141b1c6a106d0ee142c9df2743ac82e67 --- tests/parameters.test (.../parameters.test) (revision b6fa800493538a2f179224f7f1717eb70913dd8b) +++ tests/parameters.test (.../parameters.test) (revision dc94a1f141b1c6a106d0ee142c9df2743ac82e67) @@ -104,7 +104,7 @@ ? {::nsf::is integer 0xy} 0 # built in converter, but not allowed - ? {::nsf::is switch 1} {invalid value constraints "switch"} + ? {::nsf::is switch 1} {invalid value constraints "switch": invalid parameter type "switch" for argument "value"; type "switch" only allowed for non-positional arguments} ? {::nsf::is superclass M} {invalid value constraints "superclass"} # don't allow convert;