Fix method overwrite warning in variable_rate tests#549
Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom Feb 8, 2026
Merged
Conversation
Rename `affect2!` to `affect2b!` at line 99 to avoid overwriting the identically-named function defined at line 89. This eliminates the `WARNING: Method definition affect2!(Any) overwritten` that appears in CI with `--warn-overwrite=yes`. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
affect2!toaffect2b!at line 99 oftest/variable_rate.jlto avoid overwriting the identically-named function defined at line 89WARNING: Method definition affect2!(Any) overwrittenwarning that appears in all InterfaceI CI runs (LTS, stable, and pre-release)Context
CI runs with
--warn-overwrite=yesenabled, which flags when a method is redefined. Intest/variable_rate.jl, the functionaffect2!was defined identically at lines 89 and 99 — first for aConstantRateJumpand then for aVariableRateJump. Renaming the second toaffect2b!(consistent with therate2balready used on line 98) resolves the warning without changing behavior since both functions had identical bodies.Test plan
Pkg.test()passes locally (all test groups)affect2!overwrite warning🤖 Generated with Claude Code