Gen.jl icon indicating copy to clipboard operation
Gen.jl copied to clipboard

`project`ing to a nonexistent address gives 0.0 (and doesn't complain)

Open bzinberg opened this issue 5 years ago • 0 comments

I think Gen should complain in this case, because otherwise typos can silently lead to unintended behavior:

julia> @gen function f()
         {:address} ~ Gen.bernoulli(0.5)
       end;

julia> t = Gen.simulate(f, ());

julia> Gen.project(t, Gen.select(:address))
-0.6931471805599453

julia> Gen.project(t, Gen.select(:addres))
0.0

bzinberg avatar May 08 '20 15:05 bzinberg