Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let*-values doesn't work with multiple bindings #322

Closed
jcubic opened this issue Feb 26, 2024 · 0 comments
Closed

let*-values doesn't work with multiple bindings #322

jcubic opened this issue Feb 26, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@jcubic
Copy link
Collaborator

jcubic commented Feb 26, 2024

If you execute this code:

(define (div-mul x y)
  (values (/ x y) (* x y)))

(let*-values (((x) 2)
              ((y) 10)
              ((div mul) (div-mul x y)))
  (+ div mul))

It throws an error:

Error: Expecting number got undefined in expression `vector->list`
in macro:
  (() ((_ ()) ()) ((_ () body ...) (begin body ...)) ((_ ((bind values) rest ...) . body) (apply (lambda bind (let*-values (rest ...) . body)) (vector->list ((. values "valueOf"))))))
    at LambdaContext.typecheck (file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:10316:15)
    at call_function (file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:10529:32)
    at file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:10543:24
    at unpromise_array (file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:1782:12)
    at unpromise (file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:1765:16)
    at apply (file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:10535:12)
    at evaluate (file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:10705:22)
    at loop (file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:7989:29)
    at file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:7992:28
    at unpromise (file:///home/kuba/projects/jcubic/scheme/lips/src/lips.js:1770:12)
@jcubic jcubic added the bug Something isn't working label Feb 26, 2024
@jcubic jcubic added this to the 1.0 milestone Feb 26, 2024
jcubic added a commit that referenced this issue Feb 26, 2024
@jcubic jcubic closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant