Skip to content

Commit ea6b6de

Browse files
authored
Move mutable struct outside of loop (#1014)
1 parent 1ed8cc8 commit ea6b6de

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/submodels.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ using DynamicPPL
44
using Distributions
55
using Test
66

7+
# Dummy object that we can use to test VarNames with property lenses.
8+
mutable struct P
9+
a::Float64
10+
b::Float64
11+
end
12+
713
@testset "submodels.jl" begin
814
@testset "$op with AbstractPPL API" for op in [condition, fix]
915
x_val = 1.0
@@ -106,10 +112,6 @@ using Test
106112
end
107113

108114
@testset "Complex prefixes" begin
109-
mutable struct P
110-
a::Float64
111-
b::Float64
112-
end
113115
@model function f()
114116
x = Vector{Float64}(undef, 1)
115117
x[1] ~ Normal()

0 commit comments

Comments
 (0)