Fixed #23287 -- Updated error message for classonlymethod decorator.