/[guile]/guile/guile-core/BUGS
ViewVC logotype

Diff of /guile/guile-core/BUGS

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by ttn, Mon Nov 19 23:08:02 2001 UTC revision 1.13 by ttn, Wed Feb 6 23:00:37 2002 UTC
# Line 280  mvo sez: Line 280  mvo sez:
280  > parser.  > parser.
281    
282    
283    bug 12 -- goops class redefinition not signalling "no such accessor" error
284    reported-by: wawrzin@cs.tu-berlin.de / 2001-12-04
285    fixed: not-yet
286    
287    Thomas Wawrzinek sez:
288    > Running the following script produces some guile output which confueses me:
289    >
290    > ;;; script.scm
291    > (use-modules (oop goops))
292    >
293    > (define-class <root> ())
294    >
295    > (define-class <foo> (<root>)
296    >   (a #:init-value #f #:accessor a-value #:init-keyword #:a-value)
297    >   (b #:init-value #f #:accessor b-value #:init-keyword #:b-value))
298    >
299    > (define-class <bar> (<foo>))
300    >
301    > (define-method (initialize (o <bar>) . args)
302    >   (set! (a-value o) "BAR")
303    >   (next-method))
304    >
305    > (define-generic print)
306    >
307    > (define-method (print (o <bar>))
308    >   (display (a-value o)) (newline)
309    >   (display (b-value o)) (newline))
310    >
311    > ;;; OK, this is very *wrong*!
312    > (define-class <bar> (<root>))
313    >
314    > (define baz (make <bar> #:b-value "BAZ"))
315    >
316    > (print baz)
317    >
318    > $ guile -s script.scm
319    > BAR
320    > #<unknown-immediate 0x69746163>
321    > $ guile -v
322    > Guile 1.5.4
323    > Copyright (c) 1995, 1996, 1997, 2000, 2001 Free Software Foundation
324    > Guile may be distributed under the terms of the GNU General Public Licence;
325    > certain other uses are permitted as well.  For details, see the file
326    > `COPYING', which is included in the Guile distribution.
327    > There is no warranty, to the extent permitted by law.
328    >
329    > I'm running on a SuSE Linux 7.2 box ...
330    >
331    > I expected that because of the second (define-class <bar> ...) I would get
332    > some sensible error message (at least about the usage of (a-value ...) in
333    > the (print ...) generic function call).
334    >
335    > Maybe I'm mistaken here, I know that GOOPS has a class redefinition
336    > protocol, but does it go with the define-class macro?
337    >
338    > I accidently had such a second (define-class ...) with an already
339    > used class-name. In a much more complex program than the above, this
340    > resulted in a segmentation fault (backtrace told me it was GC related).
341    >
342    > To avoid such behavior, would it be sensible to have guile indicate
343    > a wrong usage error or something?
344    
345    
346  [BUGS ends here]  [BUGS ends here]

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26