Since the Julia compiler assumes this operation is not possible and optimizes according, it’s best to find other solutions (such as using a nullable Union{T, Void}
field type, or declaring the field as Ptr{Void}
) that won’t cause codegen to emit bad code.