Index: TODO =================================================================== diff -u -rabcb5e0cd5c1c27262daf76ab309e9c1f18f5ed5 -r5e70792b640c7d8b9a7235ba529dbfc0af2b84ad --- TODO (.../TODO) (revision abcb5e0cd5c1c27262daf76ab309e9c1f18f5ed5) +++ TODO (.../TODO) (revision 5e70792b640c7d8b9a7235ba529dbfc0af2b84ad) @@ -1237,6 +1237,9 @@ - removed objectproperty, replaced it by ::nsf::is - move functionalizy of objectproperty to make "obj info is ..." more efficient +- report "invalid parameter" in nsf::is and parametercheck, even when + no-complain is used. + TODO: - reflect changes in /is/objectproperty/info has/info is/ in migration guide - implement built-in-converter for "baseclass" and "metaclass"? Index: generic/xotcl.c =================================================================== diff -u -rd9b42d77f43db84a9983cc3bbc4124cf0b52df29 -r5e70792b640c7d8b9a7235ba529dbfc0af2b84ad --- generic/xotcl.c (.../xotcl.c) (revision d9b42d77f43db84a9983cc3bbc4124cf0b52df29) +++ generic/xotcl.c (.../xotcl.c) (revision 5e70792b640c7d8b9a7235ba529dbfc0af2b84ad) @@ -12682,10 +12682,16 @@ result = Parametercheck(interp, objPtr, valueObj, "value:", ¶mPtr); - /*fprintf(stderr, "after convert\n");*/ + if (paramPtr == NULL) { + /* + * We could not convert the arguments. Even with noComplain, we + * report the invalid converter spec as exception + */ + return TCL_ERROR; + } - if (paramPtr && paramPtr->converter == convertViaCmd && - (withNocomplain || result == TCL_OK)) { + if (paramPtr->converter == convertViaCmd + && (withNocomplain || result == TCL_OK)) { Tcl_ResetResult(interp); } Index: tests/parameters.tcl =================================================================== diff -u -rabcb5e0cd5c1c27262daf76ab309e9c1f18f5ed5 -r5e70792b640c7d8b9a7235ba529dbfc0af2b84ad --- tests/parameters.tcl (.../parameters.tcl) (revision abcb5e0cd5c1c27262daf76ab309e9c1f18f5ed5) +++ tests/parameters.tcl (.../parameters.tcl) (revision 5e70792b640c7d8b9a7235ba529dbfc0af2b84ad) @@ -36,6 +36,8 @@ ? {::nsf::is baseclass C} 0 ? {C info is baseclass} 0 + ? {::nsf::is class ::nx::Object} 1 + ? {::nsf::is ::nx::Object class} {invalid value constraints "::nx::Object"} ? {::nsf::parametercheck object o1} 1 ? {::nsf::parametercheck -nocomplain object o1} 1 @@ -48,7 +50,6 @@ ? {c1 info has mixin ::M} 1 ? {c1 info has mixin ::M1} {expected class but got "::M1" for parameter class} #? {::nsf::parametercheck hasmixin,arg=::M c1} 1 - #? {::nsf::is type c1 C} 1 ? {c1 info has type C} 1