From 395e11d691a9a0c907811bbb4e638ff7b4534dfd Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Fri, 25 Mar 2022 21:22:07 -0400 Subject: [PATCH] Update test/core.jl Co-authored-by: Jameson Nash --- test/core.jl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/core.jl b/test/core.jl index b9aaea3a87a8d7..52964a05e1784a 100644 --- a/test/core.jl +++ b/test/core.jl @@ -96,10 +96,13 @@ end struct N44712 a::Some{Any} b::Int - AB() = new() + N44712() = new() +end +let a = Int[0, 1], b = Int[0, 2] + GC.@preserve a b begin + @test unsafe_load(Ptr{N44712}(pointer(a))) !== unsafe_load(Ptr{N44712}(pointer(b))) + end end - -@test unsafe_load(Ptr{N44712}(pointer(Int[0,1]))) !== unsafe_load(Ptr{N44712}(pointer(Int[0,2]))) f47(x::Vector{Vector{T}}) where {T} = 0 @test_throws MethodError f47(Vector{Vector}())