Skip to content

Commit ce675e6

Browse files
authored
Merge pull request #615 from ajwheeler/checkbounds-ambiguity
method to lift checkbounds ambiguity
2 parents 9684d74 + bb4d7de commit ce675e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Interpolations.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,9 @@ end
424424

425425
@inline checkbounds(::Type{Bool}, itp::AbstractInterpolation, x::Vararg{ExpandedIndexTypes,N}) where N =
426426
_checkbounds(BoundsCheckStyle(itp), itp, x)
427+
# Explicitly handle boolean vectors to avoid ambiguity with Base.checkbounds
428+
@inline checkbounds(::Type{Bool}, itp::AbstractInterpolation, x::AbstractVector{Bool}) =
429+
_checkbounds(BoundsCheckStyle(itp), itp, x)
427430

428431
@inline checkbounds(::Type{Bool}, itp::AbstractInterpolation, x::LogicalIndex) =
429432
_checkbounds(BoundsCheckStyle(itp), itp, x)

0 commit comments

Comments
 (0)