Skip to content

Commit 4554c72

Browse files
oscardssmithaplavin
authored andcommitted
use promote_op instead of return_type
This moves to using a documented interface from a compiler internal interface (and at the same time, fixes the issues with `Tuple{Union{}}` on 1.10).
1 parent 83f4011 commit 4554c72

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/StructArraysStaticArraysExt.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ end
7777
first_staticarray = first_statictype(a...)
7878
elements, ET = if prod(newsize) == 0
7979
# Use inference to get eltype in empty case (following StaticBroadcast defined in StaticArrays.jl)
80-
eltys = Tuple{map(eltype, a)...}
81-
(), Core.Compiler.return_type(f, eltys)
80+
(), Base.promote_op(f, map(eltype, a)...)
8281
else
8382
temp = __broadcast(f, sz, s, a...)
8483
temp, eltype(temp)

0 commit comments

Comments
 (0)