-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Await should not affect original quoted promises #153
Labels
bug
Something isn't working
Comments
The problem seems to be with let: lips> (let ((x x)) (await x) x)
"hello"
lips> (let ((x x)) (await x) (list x))
(#<js-promise resolved (string)>) |
this is not related to let: lips> (begin (print (await x)) x)
hello
"hello"
lips> ((lambda () (print (await x)) x))
hello
"hello" |
The issue is not with macros: (define value '>(timer 100 "hello world"))
(define-macro (x . body) `(list ,@body))
(x (await value) value)
;; ==> ("hello world" #<js-promise resolved (string)>) |
jcubic
added a commit
that referenced
this issue
Apr 6, 2021
Handle case when macro begin evaluate promise and quoted promise in same expression
The problem was that Promise handle promise like objects like real promises, so if promise resolve to quoted promise, it will resolve to the value of quoted promise not to quoted Promise. |
jcubic
added a commit
that referenced
this issue
Apr 6, 2021
Handle case when macro begin evaluate promise and quoted promise in same expression
jcubic
added a commit
that referenced
this issue
Apr 6, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Await seems to affect original quoted promise in variable
Steps to reproduce:
The text was updated successfully, but these errors were encountered: