I've found the message #numArgs for strings (and Symbols)
that returns the number of arguments spected for aSelector.
It works fine for normal selectors, but have problems
with #, and #-> selectors.
They are not recognized as valid selector names
and return value is -1
Evaluating this code returns all the "invalid selectors" used
in the system
| unKnown |
unKnown := Set new.
Smalltalk allClasses do: [:each|
unKnown addAll: (
select: [:selector| selector numArgs < 0 ] )
Looking in the String>>#numArgs method I've found
that the #- selector is handled returning ^1,
I think that #, and #-> must also return 1.