Paste: predicate class test

Author: tizoc
Mode: factor
Date: Mon, 11 May 2009 00:26:33
Plain Text |
TUPLE: tuple-a slot ;
TUPLE: tuple-b < tuple-a ;

PREDICATE: tuple-c < tuple-b slot>> ;

GENERIC: ptest ( tuple -- )
M: tuple-a ptest drop ;

#! doing this works fine now
tuple-b new ptest

M: tuple-c ptest drop ;

#! doing this doesn't work now ('generic word ptest does not define a method for the tuple-b class')
tuple-b new ptest

New Annotation

Summary:
Author:
Mode:
Body: