I believe we need more changes of the kind made in #40. For example _35_3_Providing_the_function_to_solve.jl still has a use of Ref{Void} in a struct. This is only correct if you want the struct to contain exactly a pointer to the object nothing. @vtjnash am I right about that?
Problems arise when storing a Ptr{Void} to such a field, because Ptr{Void} is no-op convertible to Ref{Void}, so the field ends up pointing to a boxed pointer. This strikes me as a bug in the type safety of Ref.
I believe we need more changes of the kind made in #40. For example _35_3_Providing_the_function_to_solve.jl still has a use of
Ref{Void}in a struct. This is only correct if you want the struct to contain exactly a pointer to the objectnothing. @vtjnash am I right about that?Problems arise when storing a
Ptr{Void}to such a field, becausePtr{Void}is no-op convertible toRef{Void}, so the field ends up pointing to a boxed pointer. This strikes me as a bug in the type safety ofRef.