ashinn / chibi-scheme

Official chibi-scheme repository
Other
1.23k stars 141 forks source link

SRFI 231: array-stack issues #970

Closed gambiteer closed 6 months ago

gambiteer commented 6 months ago

These should all fail:

heine:~/lang/scheme/srfi-231/srfi-231-temp/chibi-test> chibi-scheme
> (import (srfi 231))
> (array-stack 0 (list (make-array (make-interval '#(2 2)) list) (make-array (make-interval '#(2 2)) list))'a)
#<Array 140719606380320>
> (array-stack 0 (list (make-array (make-interval '#(2 2)) list) (make-array (make-interval '#(2 2)) list)) u1-storage-class'a)
#<Array 140719607326720>
> (array-stack 0 (list (make-array (make-interval '#(2 2)) list) (make-array (make-interval '#(2 2)) list)) u1-storage-class)
#<Array 140719607497344>

This should eval to #t:

>
(equal?
 generic-storage-class
 (array-storage-class
  (array-stack 1
               (list (array-copy (make-array (make-interval '#(10)) (lambda (i) 42)) u8-storage-class)
                     (array-copy (make-array (make-interval '#(10)) (lambda (i) 5000)) u16-storage-class)))))
ERROR: byte-vector-set!: not an octet: 5000
ashinn commented 6 months ago

Fixed in a8939fecd0a1d1b0d0b6f6fdb82537507874485d.