Skip to content

Commit aaa1e8d

Browse files
committed
Reapply "Hotfix for Julia 1.10 claiming that istrans is type unstable"
This reverts commit 67bb055.
1 parent 67bb055 commit aaa1e8d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/abstract_varinfo.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,15 @@ If `vns` is provided, then only check if this/these varname(s) are transformed.
481481
"""
482482
istrans(vi::AbstractVarInfo) = istrans(vi, collect(keys(vi)))
483483
function istrans(vi::AbstractVarInfo, vns::AbstractVector)
484-
return !isempty(vns) && all(Base.Fix1(istrans, vi), vns)
484+
# This used to be: `!isempty(vns) && all(Base.Fix1(istrans, vi), vns)`.
485+
# In theory that should work perfectly fine. For unbeknownst reasons,
486+
# Julia 1.10 fails to infer its return type correctly. Thus we use this
487+
# slightly longer definition.
488+
isempty(vns) && return false
489+
for vn in vns
490+
istrans(vi, vn) || return false
491+
end
492+
return true
485493
end
486494

487495
"""

0 commit comments

Comments
 (0)