Skip to content

Commit ca5ad20

Browse files
committed
wip(spec): the major-18 merge pin derives the neighbour's finding when the neighbour is placed by the rule
Claude-Session: https://claude.ai/code/session_01Sfe5YjBLwB9J3y8fvm2xq1 Co-authored-by: Claude <noreply@anthropic.com>
1 parent a4e7143 commit ca5ad20

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎packages/spec/scripts/conversions-major18-merge.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,13 @@ describe('major 18 in the conversions registry — two retirements, no merge dri
355355
expect(placementFindings(side)).toEqual([]);
356356
}
357357
expect(sortFindings(retireAtListEnd(SOURCE, A, NEXT_ORDER))).not.toEqual([]);
358+
// A's entry follows its neighbour's, so a neighbour placed by the rule is
359+
// found too: its entry is now followed by A's, and A is defined elsewhere.
360+
const neighbour = IDENTS[k - 1]!;
358361
expect(placementFindings(retireAtDefinitionsEnd(SOURCE, A, NEXT_ORDER))).toEqual([
362+
...(PLACED_BEFORE_THE_RULE.has(neighbour)
363+
? []
364+
: [`${neighbour} is defined above ${IDENTS[k]}; define it directly above ${A}'s definition, the entry that follows it`]),
359365
`${A} is defined above nothing (it is the last conversion defined); define it directly above ${IDENTS[k]}'s `
360366
+ 'definition, the entry that follows it',
361367
]);

0 commit comments

Comments
 (0)