Skip to content

Commit

Permalink
add test for array conversion reported in 22330 (#25448)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored and JeffBezanson committed Jan 11, 2018
1 parent 9cdd887 commit a3496f2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,14 @@ end
# the semi-boxed union on the if-branch of the `isa` is not annotated !nonnull
@test contains(get_llvm_noopt(foo24632, (Bool,), false), "!dereferenceable_or_null")
@test !contains(get_llvm_noopt(foo24632, (Bool,), false), "!nonnull")

str_22330 = """
Base.convert(::Type{Array{T,n}}, a::Array) where {T<:Number,n} =
copyto!(Array{T,n}(uninitialized, size(a)), a)
empty(Dict(), Pair{Union{},Union{}})
"""
f_22330 = tempname()
write(f_22330, str_22330)
@test success(`$(Base.julia_cmd()) --startup-file=no $f_22330`)

0 comments on commit a3496f2

Please sign in to comment.