diff --git a/test/reducedim.jl b/test/reducedim.jl index e3179084990a4f..080926018e6730 100644 --- a/test/reducedim.jl +++ b/test/reducedim.jl @@ -544,3 +544,11 @@ end @testset "type stability (issue #43461)" begin @test (@inferred maximum(Float64, reshape(1:4,2,:); dims = 2)) == reshape([3,4],2,1) end + +@testset "Min/Max initialization test" begin + A = Vector{Union{Missing,Int}}(1:4) + A[2] = missing + @test @inferred(minimum(exp, A; dims = 1))[1] === missing + @test @inferred(maximum(exp, A; dims = 1))[1] === missing + @test @inferred(extrema(exp, A; dims = 1))[1] === (missing, missing) +end \ No newline at end of file