From b02284d08ff50620a4ff9609531d99714d6b7a16 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Wed, 6 Feb 2002 23:02:09 +0000 Subject: [PATCH] (12): New. --- BUGS | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/BUGS b/BUGS index 20c531d6f..d3a2ecb32 100644 --- a/BUGS +++ b/BUGS @@ -279,5 +279,68 @@ mvo sez: > optargs) offers, yo are probably best off writing your own argument > parser. + +bug 12 -- goops class redefinition not signalling "no such accessor" error +reported-by: wawrzin@cs.tu-berlin.de / 2001-12-04 +fixed: not-yet + +Thomas Wawrzinek sez: +> Running the following script produces some guile output which confueses me: +> +> ;;; script.scm +> (use-modules (oop goops)) +> +> (define-class ()) +> +> (define-class () +> (a #:init-value #f #:accessor a-value #:init-keyword #:a-value) +> (b #:init-value #f #:accessor b-value #:init-keyword #:b-value)) +> +> (define-class ()) +> +> (define-method (initialize (o ) . args) +> (set! (a-value o) "BAR") +> (next-method)) +> +> (define-generic print) +> +> (define-method (print (o )) +> (display (a-value o)) (newline) +> (display (b-value o)) (newline)) +> +> ;;; OK, this is very *wrong*! +> (define-class ()) +> +> (define baz (make #:b-value "BAZ")) +> +> (print baz) +> +> $ guile -s script.scm +> BAR +> # +> $ guile -v +> Guile 1.5.4 +> Copyright (c) 1995, 1996, 1997, 2000, 2001 Free Software Foundation +> Guile may be distributed under the terms of the GNU General Public Licence; +> certain other uses are permitted as well. For details, see the file +> `COPYING', which is included in the Guile distribution. +> There is no warranty, to the extent permitted by law. +> +> I'm running on a SuSE Linux 7.2 box ... +> +> I expected that because of the second (define-class ...) I would get +> some sensible error message (at least about the usage of (a-value ...) in +> the (print ...) generic function call). +> +> Maybe I'm mistaken here, I know that GOOPS has a class redefinition +> protocol, but does it go with the define-class macro? +> +> I accidently had such a second (define-class ...) with an already +> used class-name. In a much more complex program than the above, this +> resulted in a segmentation fault (backtrace told me it was GC related). +> +> To avoid such behavior, would it be sensible to have guile indicate +> a wrong usage error or something? + [BUGS ends here]