mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
eqv? not a generic, equal? dispatches to generic only for objects
* libguile/eq.c (scm_eqv_p): Not a generic any more. Since eqv? is used by e.g. `case', which should be able to compile into dispatch tables, it really doesn't make sense to dispatch out to a generic. (scm_equal_p): So it was always the case that (equal? 'foo "foo") => #f. But (equal? 'foo 'bar) could actually be extended by a generic. This was a bug, if you follow the other logic of the code. Changed so that generic functions can only extend the domain of equal? when operating on goops objects. * oop/goops.scm: No more eqv? generic. * test-suite/tests/goops.test: Remove eqv? tests.
This commit is contained in:
parent
a9a90a8820
commit
ab455d1f1b
3 changed files with 15 additions and 24 deletions
|
@ -713,7 +713,6 @@
|
|||
;;; Methods to compare objects
|
||||
;;;
|
||||
|
||||
(define-method (eqv? x y) #f)
|
||||
(define-method (equal? x y) (eqv? x y))
|
||||
|
||||
;;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue