Changing method combination would delete methods
parent
1c7b9079a9
commit
5d61651cb2
|
@ -123,12 +123,13 @@ M: method-body definer
|
||||||
M: method-body forget*
|
M: method-body forget*
|
||||||
dup "forgotten" word-prop [ drop ] [
|
dup "forgotten" word-prop [ drop ] [
|
||||||
[
|
[
|
||||||
|
[ ]
|
||||||
[ "method-class" word-prop ]
|
[ "method-class" word-prop ]
|
||||||
[ "method-generic" word-prop ] bi
|
[ "method-generic" word-prop ] tri
|
||||||
dup generic? [
|
3dup method eq? [
|
||||||
[ delete-at* ] with-methods
|
[ delete-at ] with-methods
|
||||||
[ call-next-method ] [ drop ] if
|
call-next-method
|
||||||
] [ 2drop ] if
|
] [ 3drop ] if
|
||||||
]
|
]
|
||||||
[ t "forgotten" set-word-prop ] bi
|
[ t "forgotten" set-word-prop ] bi
|
||||||
] if ;
|
] if ;
|
||||||
|
|
|
@ -435,3 +435,28 @@ must-fail-with
|
||||||
|
|
||||||
[ 92 ] [ "CHAR: \\" eval ] unit-test
|
[ 92 ] [ "CHAR: \\" eval ] unit-test
|
||||||
[ 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