From 1267d7531cef50dae92d074ff632b254321982ad Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Fri, 26 May 2017 22:44:27 +0200 Subject: [PATCH] add test for foldr on one element range (#22085) (cherry picked from commit 64cb7e087c795474a8beba3352affa78fae9a6cd) --- test/reduce.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/reduce.jl b/test/reduce.jl index 74a4c72eee030..cf89d564262f8 100644 --- a/test/reduce.jl +++ b/test/reduce.jl @@ -362,3 +362,6 @@ end test18695(r) = sum( t^2 for t in r ) @test @inferred(test18695([1.0,2.0,3.0,4.0])) == 30.0 @test_throws ArgumentError test18695(Any[]) + +# issue #21107 +@test foldr(-,2:2) == 2