Skip to content

Commit

Permalink
More tests: can load/store any 0-sized struct
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Mar 22, 2019
1 parent 3725072 commit 33c15d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/intrinsics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,7 @@ let f = Core.Intrinsics.ashr_int
end

# issue #29929
@test unsafe_store!(Ptr{Nothing}(C_NULL), nothing) == Ptr{Nothing}(0)
@test unsafe_store!(Ptr{Nothing}(C_NULL), nothing) === Ptr{Nothing}(0)
@test unsafe_load(Ptr{Nothing}(0)) === nothing
struct GhostStruct end
@test unsafe_load(Ptr{GhostStruct}(rand(Int))) === GhostStruct()

0 comments on commit 33c15d3

Please sign in to comment.