Skip to content

Commit 395e11d

Browse files
Moelfvtjnash
andauthored
Update test/core.jl
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
1 parent c1c3ea4 commit 395e11d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/core.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,13 @@ end
9696
struct N44712
9797
a::Some{Any}
9898
b::Int
99-
AB() = new()
99+
N44712() = new()
100+
end
101+
let a = Int[0, 1], b = Int[0, 2]
102+
GC.@preserve a b begin
103+
@test unsafe_load(Ptr{N44712}(pointer(a))) !== unsafe_load(Ptr{N44712}(pointer(b)))
104+
end
100105
end
101-
102-
@test unsafe_load(Ptr{N44712}(pointer(Int[0,1]))) !== unsafe_load(Ptr{N44712}(pointer(Int[0,2])))
103106

104107
f47(x::Vector{Vector{T}}) where {T} = 0
105108
@test_throws MethodError f47(Vector{Vector}())

0 commit comments

Comments
 (0)