]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix delegate vocab for lookup-method change.
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 3 Oct 2011 23:42:24 +0000 (16:42 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 3 Oct 2011 23:42:24 +0000 (16:42 -0700)
basis/delegate/delegate-tests.factor
basis/delegate/delegate.factor

index 9cf4bd01a7f22508d782f5050f638b2d987364b6..45044ef98f8064188aea787747dc2328ed3c9889 100644 (file)
@@ -64,8 +64,8 @@ CONSULT: beta hey value>> 1 - ;
 [ { hey } ] [ alpha protocol-users ] unit-test
 [ { hey } ] [ beta protocol-users ] unit-test
 [ ] [ "USE: delegate IN: delegate.tests PROTOCOL: alpha one ;" eval( -- ) ] unit-test
-[ f ] [ hey \ two method ] unit-test
-[ f ] [ hey \ four method ] unit-test
+[ f ] [ hey \ two ?lookup-method ] unit-test
+[ f ] [ hey \ four ?lookup-method ] unit-test
 [ ] [ "USE: delegate IN: delegate.tests PROTOCOL: beta two three four ;" eval( -- ) ] unit-test
 [ { hey } ] [ alpha protocol-users ] unit-test
 [ { hey } ] [ beta protocol-users ] unit-test
@@ -79,7 +79,7 @@ CONSULT: beta hey value>> 1 - ;
 [ -1 ] [ 1 <hey> three ] unit-test
 [ -1 ] [ 1 <hey> four ] unit-test
 [ ] [ "IN: delegate.tests FORGET: alpha" eval( -- ) ] unit-test
-[ f ] [ hey \ one method ] unit-test
+[ f ] [ hey \ one ?lookup-method ] unit-test
 
 TUPLE: slot-protocol-test-1 a b ;
 TUPLE: slot-protocol-test-2 < slot-protocol-test-1 { c integer } ;
@@ -147,7 +147,7 @@ PROTOCOL: silly-protocol do-me ;
 DEFER: slot-protocol-test-3
 SLOT: y
 
-[ f ] [ \ slot-protocol-test-3 \ y>> method >boolean ] unit-test
+[ f ] [ \ slot-protocol-test-3 \ y>> ?lookup-method >boolean ] unit-test
 
 [ [ ] ] [
     "IN: delegate.tests
@@ -157,7 +157,7 @@ CONSULT: y>> slot-protocol-test-3 x>> ;"
     <string-reader> "delegate-test-1" parse-stream
 ] unit-test
 
-[ t ] [ \ slot-protocol-test-3 \ y>> method >boolean ] unit-test
+[ t ] [ \ slot-protocol-test-3 \ y>> ?lookup-method >boolean ] unit-test
 
 [ [ ] ] [
     "IN: delegate.tests
@@ -167,7 +167,7 @@ TUPLE: slot-protocol-test-3 x y ;"
 
 ! We now have a real accessor for the y slot; we don't want it to
 ! get lost
-[ t ] [ \ slot-protocol-test-3 \ y>> method >boolean ] unit-test
+[ t ] [ \ slot-protocol-test-3 \ y>> ?lookup-method >boolean ] unit-test
 
 ! We want to be able to override methods after consultation
 [ [ ] ] [
index ec005482d186ead3fa85419e2d78d7985ed037af..1b0b9e3a355f4ecc70e8419fd79ad7b1c5d8c589 100644 (file)
@@ -91,7 +91,7 @@ M: broadcast (consult-method-quot)
     \ protocol-consult word-prop delete-at ;
 
 : unconsult-method ( word consultation -- )
-    [ class>> swap first lookup-method ] keep
+    [ class>> swap first ?lookup-method ] keep
     over [
         over "consultation" word-prop eq?
         [ forget ] [ drop ] if
@@ -124,7 +124,7 @@ M: consultation forget*
 <PRIVATE
 
 : forget-all-methods ( classes words -- )
-    [ first lookup-method forget ] cartesian-each ;
+    [ first ?lookup-method forget ] cartesian-each ;
 
 : protocol-users ( protocol -- users )
     protocol-consult keys ;