Skip to content

Commit 8c9004e

Browse files
committed
Use convert for obtaining matching values when running models (#181)
As explained in TuringLang/Libtask.jl#74 (comment), together with TuringLang/Libtask.jl#77 this PR fixes TuringLang/Libtask.jl#74.
1 parent 5376534 commit 8c9004e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DynamicPPL"
22
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
3-
version = "0.9.5"
3+
version = "0.9.6"
44

55
[deps]
66
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"

src/compiler.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ Convert the `value` to the correct type for the `sampler` and the `vi` object.
369369
function matchingvalue(sampler, vi, value)
370370
T = typeof(value)
371371
if hasmissing(T)
372-
return get_matching_type(sampler, vi, T)(value)
372+
return convert(get_matching_type(sampler, vi, T), value)
373373
else
374374
return value
375375
end

0 commit comments

Comments
 (0)