Skip to content

Commit 8bd2085

Browse files
committed
Added comment on a potential issue with _pointwise_tilde_assume
1 parent 91a6907 commit 8bd2085

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/pointwise_logdensities.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ end
175175
function _pointwise_tilde_assume(context, right, left, vns, vi)
176176
# We need to drop the `vi` returned.
177177
values_and_logps = broadcast(right, left, vns) do r, l, vn
178+
# HACK(torfjelde): This drops the `vi` returned, which means the `vi` is not updated
179+
# in case of immutable varinfos. But a) atm we're only using mutable varinfos for this,
180+
# and b) even if the variables aren't stored in the vi correctly, we're not going to use
181+
# this vi for anything downstream anyways, i.e. I don't see a case where this would matter
182+
# for this particular use case.
178183
val, logp, _ = tilde_assume(context, r, vn, vi)
179184
return val, logp
180185
end

0 commit comments

Comments
 (0)