Skip to content

Commit b18752b

Browse files
committed
translate literal variables
1 parent 7d73c27 commit b18752b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/tapedfunction.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,14 @@ function translate!!(var::IRVar, line::Core.SlotNumber,
368368
return Instruction(func, input, output)
369369
end
370370

371+
function translate!!(var::IRVar, line::Number, # literal vars
372+
bindings::Bindings, isconst::Bool, ir)
373+
func = identity
374+
input = (bind_var!(line, bindings, ir),)
375+
output = bind_var!(var, bindings, ir)
376+
return Instruction(func, input, output)
377+
end
378+
371379
function translate!!(var::IRVar, line::NTuple{N, Symbol},
372380
bindings::Bindings, isconst::Bool, ir) where {N}
373381
# for syntax (; x, y, z), see Turing.jl#1873

0 commit comments

Comments
 (0)