Skip to content

Commit

Permalink
Update test/core.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
  • Loading branch information
Moelf and vtjnash authored Mar 26, 2022
1 parent c1c3ea4 commit 395e11d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}())
Expand Down

0 comments on commit 395e11d

Please sign in to comment.