Re: subseq behaviour if end is out of range? not an error for vectors
Jens Thiele <[email protected]> Fri, 08 May 2026 16:00:38 +0200
| Newsgroups | gmane.lisp.scheme.gauche |
|---|---|
| Message-ID | <[email protected]> |
Shiro Kawai <[email protected]> writes: > Fix pushed. It is because vector-copy explicitly allows out-of-bound > start/end, and subseq delegated to it unconditionally. Now subseq checks > the range. works, thanks! jens (sid-amd64-sbuild)karme@amalthea:/tmp/Gauche$ git describe --tags release0_9_15-1391-g36ef7c805 (sid-amd64-sbuild)karme@amalthea:/tmp/Gauche$ src/gosh -ftest -V Gauche scheme shell, version 0.9.16_pre2 [utf-8,pthreads], x86_64-pc-linux-gnu (version "0.9.16_pre2") (command "gosh") (scheme.id gauche) (languages scheme r5rs r7rs) (encodings utf-8) (website "https://practical-scheme.net/gauche") (build.platform "x86_64-pc-linux-gnu") (build.configure) (build.gosh-version "0.9.16_pre2") (scheme.path "/tmp/Gauche/src/../lib" "/tmp/Gauche/src/../libsrc" "/tmp/Gauche/src/../src" "/usr/local/share/gauche-0.98/site/lib" "/usr/local/share/gauche-0.98/0.9.16_pre2/lib") (threads pthreads) (gauche.net.tls) (sid-amd64-sbuild)karme@amalthea:/tmp/Gauche$ src/gosh -ftest gosh$ (use gauche.sequence) gosh$ (subseq #(0) 0 2) *** ASSERTION-VIOLATION: Invalid assumption: (ineq 0 <= start <= end <= (vector-length seq)) Stack Trace: _______________________________________ 0 (report-error e) 1 (error <assertion-violation> (format "Invalid assumption: ~s" ... 2 (eval expr env) at "/tmp/Gauche/src/../lib/gauche/interactive.scm":407 3 (evaluator exp (vm-current-module)) 4 (with-error-handler (^e (report-error e) #t) (^ () (let loop2 ...