generic.math assocs hashtables io kernel math namespaces parser
prettyprint sequences strings tools.test vectors words
quotations classes classes.algebra classes.tuple continuations
-layouts classes.union sorting compiler.units eval ;
+layouts classes.union sorting compiler.units eval multiline ;
IN: generic.tests
GENERIC: foobar ( x -- y )
[ 3.4 3 ] [ 3.4 tag-and-f ] unit-test
! Issues with forget
-GENERIC: generic-forget-test-1
+GENERIC: generic-forget-test-1 ( a b -- c )
M: integer generic-forget-test-1 / ;
: a-word ;
-GENERIC: a-generic
+GENERIC: a-generic ( a -- b )
M: integer a-generic a-word ;
[ ] [ "IN: generic.tests : a-generic ;" eval ] unit-test
[ f ] [ "m" get \ a-word usage memq? ] unit-test
+
+! erg's regression
+[ ] [
+ <"
+ IN: compiler.tests
+
+ GENERIC: jeah ( a -- b )
+ TUPLE: boii ;
+ M: boii jeah ;
+ GENERIC: jeah* ( a -- b )
+ M: boii jeah* jeah ;
+ "> eval
+
+ <"
+ IN: compiler.tests
+ FORGET: boii
+ "> eval
+
+ <"
+ IN: compiler.tests
+ TUPLE: boii ;
+ M: boii jeah ;
+ "> eval
+] unit-test
first2 method definition ;
M: method-spec forget*
- first2 method forget* ;
+ first2 method [ forgotten-definition ] [ forget* ] bi ;
M: method-spec smart-usage
second smart-usage ;