Skip to content

Commit a3496f2

Browse files
KristofferCJeffBezanson
authored andcommitted
add test for array conversion reported in 22330 (#25448)
1 parent 9cdd887 commit a3496f2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/codegen.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,3 +322,14 @@ end
322322
# the semi-boxed union on the if-branch of the `isa` is not annotated !nonnull
323323
@test contains(get_llvm_noopt(foo24632, (Bool,), false), "!dereferenceable_or_null")
324324
@test !contains(get_llvm_noopt(foo24632, (Bool,), false), "!nonnull")
325+
326+
str_22330 = """
327+
Base.convert(::Type{Array{T,n}}, a::Array) where {T<:Number,n} =
328+
copyto!(Array{T,n}(uninitialized, size(a)), a)
329+
330+
empty(Dict(), Pair{Union{},Union{}})
331+
"""
332+
f_22330 = tempname()
333+
write(f_22330, str_22330)
334+
@test success(`$(Base.julia_cmd()) --startup-file=no $f_22330`)
335+

0 commit comments

Comments
 (0)