cached: only abstract and concrete classes can have cached functions

Signed-off-by: Jean Privat <jean@pryen.org>
tests: add error paths for base_at_cached

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: Fix cached

Only abstract and concrete classes can have cached functions

fixes #544

Pull-Request: #545
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>