Skip to content

Commit 07c4dae

Browse files
Sacha0tkelman
authored andcommitted
Add NEWS.md entry for getindex(::AbstractString, ::AbstractVector) signature tightening (#20248). (#21835)
1 parent adcf591 commit 07c4dae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

NEWS.md

+9
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,14 @@ This section lists changes that do not have deprecation warnings.
244244
245245
* The `count` function no longer sums non-boolean values ([#20404])
246246
247+
* The generic `getindex(::AbstractString, ::AbstractVector)` method's signature has been
248+
tightened to `getindex(::AbstractString, ::AbstractVector{<:Integer})`. Consequently,
249+
indexing into `AbstractString`s with non-`AbstractVector{<:Integer}` `AbstractVector`s
250+
now throws a `MethodError` in the absence of an appropriate specialization.
251+
(Previously such cases failed less explicitly with the exception of
252+
`AbstractVector{Bool}`, which now throws an `ArgumentError` noting that
253+
logical indexing into strings is not supported.) ([#20248])
254+
247255
* Bessel, Hankel, Airy, error, Dawson, eta, zeta, digamma, inverse digamma,
248256
trigamma, and polygamma special functions have been moved from Base to
249257
the
@@ -585,6 +593,7 @@ Deprecated or removed
585593
[#20079]: https://github.com/JuliaLang/julia/issues/20079
586594
[#20164]: https://github.com/JuliaLang/julia/issues/20164
587595
[#20228]: https://github.com/JuliaLang/julia/issues/20228
596+
[#20248]: https://github.com/JuliaLang/julia/issues/20248
588597
[#20249]: https://github.com/JuliaLang/julia/issues/20249
589598
[#20268]: https://github.com/JuliaLang/julia/issues/20268
590599
[#20321]: https://github.com/JuliaLang/julia/issues/20321

0 commit comments

Comments
 (0)