On Fri, 16 Sep 2016, David Pirotte wrote:
Jan,

I haven't managed to isolate it properly but I observed some strange
problem with "concatenate" (using my "aiscm" library).

     (define-method (match (i <integer>) . args) ...)
     ...
     (apply match (concatenate (list (list 1) (list 2 2 3 4 5 6 ))))
     oop/goops.scm:1336:2: oop/goops.scm:1336:2: In procedure vector-ref: Value
out of range: 7

        impossible to help you on this because the snipset is incomplete
        please provide a complete match definition

Also, I think match is really a 'problematic' name, because it is defined in
(ice-9 match), and most of us almost  always import this module.

Chers,
David


Hi David,

I managed to create a failing test. After a certain number of differently typed calls there is an error in "multiple-arity-dispatcher":

    (use-modules (oop goops))
    (define-generic native-type)
    (define-method (native-type (i <integer>) . args) 0)
    (define-method (native-type (i <real>) . args) 1)
    (define-method (native-type (b <boolean>) . args) 2)

    (native-type 1)
    (native-type 1.3)
    (native-type #f)
    (native-type 1 1.2)
    (native-type 1.4 2)
    (native-type 1.4 2 3)
    ;(native-type 1.4 1.5); add more calls as needed
    ;(native-type #f #t); add more calls as needed
;oop/goops.scm:1336:2: oop/goops.scm:1336:2: In procedure vector-ref: Value out 
of range: 3
;
;Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
    ,bt
;In oop/goops.scm: ;While executing meta-command: ;ERROR: In procedure vector-set!: Value out of range: 5

I hope you can fix it. I can have a look as well but I don't understand the code well enough at the moment.

Regards
Jan

Reply via email to