Subject: bug#18583: possibly buggy top level behavior in master

From: Daniel Llorens <[email-masked]>
Date: Mon, 29 Sep 2014 15:24:31 +0200

The following code:

(define-syntax define-lues
  (syntax-rules ()
    ((_ () exp)
     (call-with-values (lambda () exp) (lambda () 'unspecified)))
    ((_ (var . vars) exp)
     (begin
       (define var (call-with-values (lambda () exp) list))
       (define-lues vars (apply values (cdr var)))
       (define var (car var))))
    ((_ var exp)
     (define var (call-with-values (lambda () exp) list)))))

(define-lues (a) (values (make-vector 3 9)))
(vector-length a)

In 2.0, either pasting this in the REPL or (load "...") a file
containing this produces the expected result, 3.

In the current master (f7582), pasting in the REPL produces the
same result, but loading from a file this produces the error:

> In procedure vector-ref: Wrong type argument in position 1 (expecting vector): (#(9 9 9))

I'm aware of the workarounds, I'm reporting the behavior itself.

Regards,

	Daniel