Skip to content

Commit 878b3de

Browse files
JeffBezansonKristofferC
authored and
KristofferC
committed
fix #50562, regression in in of tuple of Symbols
1 parent c1126a3 commit 878b3de

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

base/tuple.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,6 @@ any(x::Tuple{Bool, Bool, Bool}) = x[1]|x[2]|x[3]
607607

608608
# a version of `in` esp. for NamedTuple, to make it pure, and not compiled for each tuple length
609609
function sym_in(x::Symbol, @nospecialize itr::Tuple{Vararg{Symbol}})
610-
@noinline
611610
@_total_meta
612611
for y in itr
613612
y === x && return true

test/tuple.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,12 @@ g42457(a, b) = Base.isequal(a, b) ? 1 : 2.0
763763
# issue #46049: setindex(::Tuple) regression
764764
@inferred Base.setindex((1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), 42, 1)
765765

766+
# issue #50562
767+
f50562(r) = in(:i_backward, r[])
768+
r50562 = Ref((:b_back, :foofakgka, :i_backw))
769+
f50562(r50562)
770+
@test @allocated(f50562(r50562)) == 0
771+
766772
# issue #47326
767773
function fun1_47326(args...)
768774
head..., tail = args

0 commit comments

Comments
 (0)