Skip to content

Delete unnecessary lastindex() method#534

Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom
JamesWrigley:lastindex
Jan 29, 2026
Merged

Delete unnecessary lastindex() method#534
ChrisRackauckas merged 1 commit intoSciML:masterfrom
JamesWrigley:lastindex

Conversation

@JamesWrigley
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Fixes these invalidations when loaded through CurveFit.jl:

 inserting lastindex(A::RecursiveArrayTools.ArrayPartition) @ RecursiveArrayTools ~/.julia/packages/RecursiveArrayTools/otwou/src/array_partition.jl:283 invalidated:                                                                          
   backedges: 1: superseding lastindex(a::AbstractArray) @ Base abstractarray.jl:426 with MethodInstance for lastindex(::AbstractVector{UInt8}) (506 children)

Should not be necessary because of the Base implementation: https://github.com/JuliaLang/julia/blob/8f47b58ef511dd703e3eb9aeb37a668fe4403ca5/base/abstractarray.jl#L452

@JamesWrigley
Copy link
Member Author

Test failure looks unrelated.

@ChrisRackauckas ChrisRackauckas merged commit 250031f into SciML:master Jan 29, 2026
26 of 27 checks passed
@JamesWrigley JamesWrigley deleted the lastindex branch January 29, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants