summaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-01-26 17:54:26 +0100
committerAndy Wingo <wingo@pobox.com>2015-01-26 17:57:44 +0100
commit649ec8d8234ccda55b81930a0cb07d66b4a855c6 (patch)
tree82abe2f3baff9a84421e0d7c1985d139061d1e7d /test-suite
parent583a23bf104c84d9617222856e188f3f3af4934d (diff)
downloadguile-649ec8d8234ccda55b81930a0cb07d66b4a855c6.tar.gz
Accessor methods only apply to subclasses with their slot
* libguile/goops.c (is_accessor_method, scm_compute_applicable_methods): Fix regression from 51f66c912078a25ab0380c8fc070abb73d178d98 (2009). Accessor methods are added on each subclass on which the slot is present; therefore if a subclass doesn't have a method, then the methods doesn't apply. Truly fixes #17355, unlike 583a23bf104c84d9617222856e188f3f3af4934d. * module/oop/goops.scm (compute-cmethod, compute-getter-method) (compute-setter-method): Revert earlier changes. * test-suite/tests/goops.test ("accessor slots"): Update for new expectations, in agreement with Guile 1.8.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/tests/goops.test6
1 files changed, 4 insertions, 2 deletions
diff --git a/test-suite/tests/goops.test b/test-suite/tests/goops.test
index 1c6d33ec0..821ccf1c3 100644
--- a/test-suite/tests/goops.test
+++ b/test-suite/tests/goops.test
@@ -626,8 +626,10 @@
(pass-if-equal "a accessor on a" 'a (a-accessor a))
(pass-if-equal "a accessor on ab" 'a (a-accessor ab))
(pass-if-equal "a accessor on ba" 'a (a-accessor ba))
- (pass-if-equal "a accessor on cab" 'a (a-accessor cab))
- (pass-if-equal "a accessor on cba" 'a (a-accessor cba))
+ (pass-if-exception "a accessor on cab" exception:no-applicable-method
+ (a-accessor cab))
+ (pass-if-exception "a accessor on cba" exception:no-applicable-method
+ (a-accessor cba))
(pass-if-equal "b accessor on a" 'b (b-accessor b))
(pass-if-equal "b accessor on ab" 'b (b-accessor ab))
(pass-if-equal "b accessor on ba" 'b (b-accessor ba))