Vocabularygeneric.singleError descriptionThrown by
call-next-method if the values on the stack are not compatible with the current method.
ExamplesThe following code throws this error:
GENERIC: error-test ( object -- )
M: string error-test print ;
M: integer error-test number>string call-next-method ;
123 error-test
This results in the method on
integer being called, which then passes a string to
call-next-method. However, this fails because the string is not compatible with the current method.
This usually indicates programmer error; if the intention above was to call the string method on the result of
number>string, the code should be rewritten as follows:
M: integer error-test number>string error-test ;
DefinitionMethods