Remove the shadowed copy of matchExistentialInstantiation - #46
Open
Chessing234 wants to merge 1 commit into
Open
Remove the shadowed copy of matchExistentialInstantiation#46Chessing234 wants to merge 1 commit into
Chessing234 wants to merge 1 commit into
Conversation
logic.js defines matchExistentialInstantiation twice, 147 lines apart, with byte-identical bodies. The second declaration silently replaces the first, so the earlier copy has never run -- and a fix applied to it would appear to do nothing. Dropping the dead copy leaves the same 74 functions with identical sources.
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.
docs/js/logic.jsdeclaresmatchExistentialInstantiationtwice — once at line 871 and again at line 1018, 147 lines apart. The two bodies are byte-identical (54 lines each). In JavaScript the second declaration silently replaces the first, so the earlier copy has never run.That is worth removing not because the duplication costs anything at runtime, but because a fix applied to the first copy would appear to do nothing. It sits among the other
match*law handlers, so it is a plausible place to edit by mistake.Evidence
The removal is provably a no-op. Loading
logic.jsbefore and after the change in separatevmcontexts and comparing every function:Same 74 top-level functions, every one with identical source text, none dropped — including
matchExistentialInstantiationitself, which still resolves to the surviving definition.I checked the two bodies were genuinely identical rather than near-identical by extracting each with a brace-matching scan and comparing the strings directly.
Scope
Only the dead declaration and its comment are removed; nothing else in the file is touched, and no behaviour changes. I have not tried to reorder or otherwise tidy the surrounding handlers.
This was AI-assisted.