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

Quoted promises don't work with Promise static methods #155

Closed
jcubic opened this issue Apr 9, 2021 · 0 comments
Closed

Quoted promises don't work with Promise static methods #155

jcubic opened this issue Apr 9, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@jcubic
Copy link
Owner

jcubic commented Apr 9, 2021

Example:

(Promise.all (vector '>(wait 1000 10) '>(wait 1000 10)))
;; ==> #(#<js-promise (pending)> #<js-promise (pending)>)

This is because right now quoted promise don't work like promises anymore to fix #153
Blocking of promise should work like boxing and unboxing. So JavaScript functions and methods get promise like object.

this works:

(let ((x (vector '>(wait 1000 10) '>(wait 1000 10))))
  (--> x (map (lambda (x) (set-obj! x 'then))))
  (Promise.all x))
@jcubic jcubic added the bug Something isn't working label Apr 9, 2021
@jcubic jcubic closed this as completed Apr 9, 2021
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