When running the below code, one observes that x is being resampled when performing the result1 query, and that a different value for x is therefore printed instead of "1.0" as the value should be (since that is what it is conditioned on).
using Turing, Distributions
@model function gdemo(x, y)
println("START")
s ~ InverseGamma(2, 3)
m ~ Normal(0, sqrt(s))
x ~ filldist(Normal(m, sqrt(s)), length(y))
@show x
for i in 1:length(y)
@show x[i]
y[i] ~ Normal(x[i], sqrt(s))
end
end
model_gdemo = gdemo([1.0, 0.0], [1.5, 0.0])
c2 = sample(model_gdemo, NUTS(0.65), 100)
result1 = prob"y = [1.5] | chain=c2, model = model_gdemo, x = [1.0]"