Fix erg's bug

db4
Slava Pestov 2008-09-03 23:38:32 -05:00
parent 03e205c462
commit 7bc32975ee
2 changed files with 28 additions and 4 deletions

View File

@ -2,7 +2,7 @@ USING: accessors alien arrays definitions generic generic.standard
generic.math assocs hashtables io kernel math namespaces parser generic.math assocs hashtables io kernel math namespaces parser
prettyprint sequences strings tools.test vectors words prettyprint sequences strings tools.test vectors words
quotations classes classes.algebra classes.tuple continuations 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 IN: generic.tests
GENERIC: foobar ( x -- y ) GENERIC: foobar ( x -- y )
@ -135,7 +135,7 @@ M: f tag-and-f 4 ;
[ 3.4 3 ] [ 3.4 tag-and-f ] unit-test [ 3.4 3 ] [ 3.4 tag-and-f ] unit-test
! Issues with forget ! Issues with forget
GENERIC: generic-forget-test-1 GENERIC: generic-forget-test-1 ( a b -- c )
M: integer generic-forget-test-1 / ; M: integer generic-forget-test-1 / ;
@ -187,7 +187,7 @@ M: f generic-forget-test-3 ;
: a-word ; : a-word ;
GENERIC: a-generic GENERIC: a-generic ( a -- b )
M: integer a-generic a-word ; M: integer a-generic a-word ;
@ -198,3 +198,27 @@ M: integer a-generic a-word ;
[ ] [ "IN: generic.tests : a-generic ;" eval ] unit-test [ ] [ "IN: generic.tests : a-generic ;" eval ] unit-test
[ f ] [ "m" get \ a-word usage memq? ] 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

View File

@ -130,7 +130,7 @@ M: method-spec definition
first2 method definition ; first2 method definition ;
M: method-spec forget* M: method-spec forget*
first2 method forget* ; first2 method [ forgotten-definition ] [ forget* ] bi ;
M: method-spec smart-usage M: method-spec smart-usage
second smart-usage ; second smart-usage ;