Repository navigation
Conversation
map-signature-mismatch and map-impl-signature-mismatch compared the first line of a MAP prototype with the first line of its PROCEDURE. A signature continued with `|` has no closing `)` on that line, so its parameter list read as empty: - continued on one side only: a false mismatch (n parameters vs 0); - continued on both sides: always a "match", so a real mismatch after the break went unreported. The same first-line read hid a `,DLL` attribute on a continuation line, and missing-map-implementation reported the external prototype as unimplemented. Every line read in MapDeclarationDiagnostics now goes through a logicalLine() helper that joins the continuation lines with the existing withContinuations() (ClassMemberScan, msarson#778). New MapSignatureContinuation.test.ts (9 tests): one side continued (LF and CRLF), both sides continued with equal and with differing parameters, a self-declared MODULE in the member's own MAP, the PROGRAM-side check, and `,DLL` on a continuation line. Without the fix 8 of the 9 fail; the remaining one (both continued, equal parameters) passed vacuously before. Server suite: 4513 passing, 3 pending, 0 failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks, this is going into 1.0.10. Your commit is unchanged; I added three on top:
Yes please to the follow-up you offered: the "Update declaration/implementation to match" quick fixes for a signature continued with — Alice |
msarson
added a commit
that referenced
this pull request
Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
msarson
added a commit
that referenced
this pull request
Nov 3, 2026
…otype The review found Cases 2 and 2c (four of the eleven reads) reached by no test. Both continued, a parameter differing after the break: reported with the fix, missed without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
msarson
added a commit
that referenced
this pull request
Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What happens
A MAP prototype continued with
|, implemented on one line:The two signatures are identical, but the implementation gets
Procedure 'MyProc' signature does not match its MAP declaration.
The opposite shape is worse: when both sides are continued, a real mismatch after the
break is never reported.
Root cause
MapDeclarationDiagnosticsreads each signature from its first line only:ProcedureSignatureUtils.splitParametersmatchesPROCEDURE\s*\(([^)]*)\). On a line endingin
|there is no closing), so the parameter list reads as empty. That gives:map-signature-mismatch(and the samefor
map-impl-signature-mismatchon the PROGRAM side);,DLLon a continuation line: the,DLLtest invalidateMissingImplementationsreadsthe first line too, misses the attribute, and reports the external prototype as
missing-map-implementation.Fix
All eleven line reads in the file go through one helper, which joins the continuation lines
with the existing
withContinuations()fromClassMemberScan(added for #778 for the samereason on CLASS members):
That covers Cases 1, 2 and 2c, the cross-file branch of
validateMissingMapDeclarations, and thesignature compare and the
,DLLcheck invalidateMissingImplementations. A line without atrailing
|is returned unchanged, so single-line signatures behave exactly as before.Testing
New
server/src/test/MapSignatureContinuation.test.ts, 9 tests:|)map-signature-mismatchMODULEin the member's own MAP, continued prototypemap-impl-signature-mismatch,DLL(1)on the continuation lineWith
MapDeclarationDiagnostics.tsreverted to the base, 8 of the 9 fail. The remaining one(both continued, same parameters) passed before only because both sides read as empty.
Server suite: 4513 passing, 3 pending, 0 failing.
Scope
Left out on purpose:
MapDeclarationCodeActionProvider("Update declaration/implementationto match") still work on one line:
findParameterListSpanfinds no closed list on acontinued line, so no action is offered. Nothing gets broken, but no fix is offered either.
Rewriting a parameter list across several lines needs a multi-line edit range. That is a
separate change, which I can follow up on if wanted.
ProcedureSignatureUtilsitself is unchanged. The callers decide which text is thesignature, as the other
withContinuationscallers inMemberLocatorServicealready do.