From b7b4bf1fd24139b9247162504fbdbfe52c5a57a5 Mon Sep 17 00:00:00 2001 From: Will Tebbutt Date: Thu, 8 Aug 2024 10:08:25 +0100 Subject: [PATCH] Verify that _unsafe_copyto! works with abstract element types --- src/rrules/builtins.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rrules/builtins.jl b/src/rrules/builtins.jl index 562b94bea..f948c47d1 100644 --- a/src/rrules/builtins.jl +++ b/src/rrules/builtins.jl @@ -1063,6 +1063,10 @@ function generate_derived_rrule!!_test_cases(rng_ctor, ::Val{:builtins}) (false, :none, nothing, getindex, randn(5), [1, 2, 2]), (false, :none, nothing, setindex!, randn(5), [4.0, 5.0], [1, 1]), (false, :none, nothing, setindex!, randn(5), [4.0, 5.0, 6.0], [1, 2, 2]), + ( + false, :none, nothing, + Base._unsafe_copyto!, fill!(Matrix{Real}(undef, 5, 4), 1.0), 3, randn(10), 2, 4, + ), ] memory = Any[] return test_cases, memory