Changing method combination would delete methods
parent
1c7b9079a9
commit
5d61651cb2
|
@ -123,12 +123,13 @@ M: method-body definer
|
|||
M: method-body forget*
|
||||
dup "forgotten" word-prop [ drop ] [
|
||||
[
|
||||
[ ]
|
||||
[ "method-class" word-prop ]
|
||||
[ "method-generic" word-prop ] bi
|
||||
dup generic? [
|
||||
[ delete-at* ] with-methods
|
||||
[ call-next-method ] [ drop ] if
|
||||
] [ 2drop ] if
|
||||
[ "method-generic" word-prop ] tri
|
||||
3dup method eq? [
|
||||
[ delete-at ] with-methods
|
||||
call-next-method
|
||||
] [ 3drop ] if
|
||||
]
|
||||
[ t "forgotten" set-word-prop ] bi
|
||||
] if ;
|
||||
|
|
|
@ -435,3 +435,28 @@ must-fail-with
|
|||
|
||||
[ 92 ] [ "CHAR: \\" eval ] unit-test
|
||||
[ 92 ] [ "CHAR: \\\\" eval ] unit-test
|
||||
|
||||
[ ] [
|
||||
{
|
||||
"IN: parser.tests"
|
||||
"USING: math arrays ;"
|
||||
"GENERIC: change-combination"
|
||||
"M: integer change-combination 1 ;"
|
||||
"M: array change-combination 2 ;"
|
||||
} "\n" join <string-reader> "change-combination-test" parse-stream drop
|
||||
] unit-test
|
||||
|
||||
[ ] [
|
||||
{
|
||||
"IN: parser.tests"
|
||||
"USING: math arrays ;"
|
||||
"GENERIC# change-combination 1"
|
||||
"M: integer change-combination 1 ;"
|
||||
"M: array change-combination 2 ;"
|
||||
} "\n" join <string-reader> "change-combination-test" parse-stream drop
|
||||
] unit-test
|
||||
|
||||
[ 2 ] [
|
||||
"change-combination" "parser.tests" lookup
|
||||
"methods" word-prop assoc-size
|
||||
] unit-test
|
||||
|
|
Loading…
Reference in New Issue