Currently type hints on literals containing runtime values are lost:
`
user=> (set! warn-on-reflection true)
true
user=> (fn [x] (java.util.HashMap. ^java.util.Map {"foo" x}))
Reflection warning, null:1:9 - call to java.util.HashMap ctor can't be resolved.
function[user/eval7479/fn--7480]
`
A workaround that currently works is to introduce a local and type hint the binding
`
user=> (fn [x] (let [^java.util.Map m {"foo" x}] (java.util.HashMap. m)))
function[user/eval7487/fn--7488]
`
The attached patch fixes this issue by tracking type hints for literal values, making the reflection go away even in the original case
`
user=> (set! warn-on-reflection true)
true
user=> (fn [x] (java.util.HashMap. ^java.util.Map {"foo" x}))
function[user/eval7479/fn--7480]
`
Approach: preserve user hints in literal collections
Patch: 0001-CLJ-1929-preserve-type-hints-in-literals.patch