From e35134cfe5bf77d757a0d9b6caf89b09b7fa6de3 Mon Sep 17 00:00:00 2001 From: Thomas Christensen Date: Mon, 14 Mar 2022 12:16:42 -0400 Subject: [PATCH] remove stale `broadcasted_indices`: (#1012) - referenced non-extant `indices` - `broadcasted_indices` was deprecated to `broadcasted_axes` in https://github.com/JuliaLang/julia/pull/25377 - `broadcasted_axes` was then replaced by plain `axes` https://github.com/JuliaLang/julia/commit/a2feccf737d32df196ecd7cab4587a5bc02ef6c7 - StaticArrays already has `axes` methods --- src/broadcast.jl | 2 -- test/broadcast.jl | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/broadcast.jl b/src/broadcast.jl index b5a69b63..511c637d 100644 --- a/src/broadcast.jl +++ b/src/broadcast.jl @@ -49,8 +49,6 @@ _bcs1(a::Base.OneTo, b::SOneTo) = _bcs1(a, Base.OneTo(b)) ## Internal broadcast machinery for StaticArrays ## ################################################### -broadcast_indices(A::StaticArray) = indices(A) - # TODO: just use map(broadcast_size, as)? @inline broadcast_sizes(a, as...) = (broadcast_size(a), broadcast_sizes(as...)...) @inline broadcast_sizes() = () diff --git a/test/broadcast.jl b/test/broadcast.jl index 1baa4f28..2ec692fa 100644 --- a/test/broadcast.jl +++ b/test/broadcast.jl @@ -115,7 +115,7 @@ end # Issue #200: broadcast with Adjoint @test @inferred(v1 .+ v2') === @SMatrix [2 5; 3 6] @test @inferred(v1 .+ transpose(v2)) === @SMatrix [2 5; 3 6] - # Issue 382: infinite recursion in Base.Broadcast.broadcast_indices with Adjoint + # Issue 382: infinite recursion in broadcasting axes with Adjoint @test @inferred(SVector(1,1)' .+ [1, 1]) == [2 2; 2 2] @test @inferred(transpose(SVector(1,1)) .+ [1, 1]) == [2 2; 2 2]