Skip to content

Commit 010e66e

Browse files
committed
replace mutable struct with NamedTuple in test
1 parent 1ed8cc8 commit 010e66e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/submodels.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,14 @@ using Test
106106
end
107107

108108
@testset "Complex prefixes" begin
109-
mutable struct P
110-
a::Float64
111-
b::Float64
112-
end
113109
@model function f()
114110
x = Vector{Float64}(undef, 1)
115111
x[1] ~ Normal()
116112
y ~ Normal()
117113
return x[1]
118114
end
119115
@model function g()
120-
p = P(1.0, 2.0)
116+
p = (; a=1.0, b=2.0)
121117
p.a ~ to_submodel(f())
122118
p.b ~ Normal()
123119
return (p.a, p.b)

0 commit comments

Comments
 (0)