metadata is not forwarded to bound symbols in `p/let`
Open
- Dominant language
- Clojure
- Stars
- 547
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
I have in a ClojureScript project something akin to:
```clojure
(ns app.foo
(:require
[promesa.core :as p]))
(deftype Foo [bar baz])
(defn foo
[bar baz]
(->Foo bar baz))
(p/let [x (foo "bar" "baz")]
(set! (.-bar foo) "qux")))
```
shadow-cljs compiles the code with a warning "Cannot infer target type in expression: (set! (.-bar foo) "qux")". Changing the code to use `let` instead of `p/let` fixes the issue.
I believe (via our Slack thread) that this is because `x` does not get the correct metadata attached to it when `p/let` is constructing the bindings.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.