mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-22 00:31:17 +00:00
Adversarial review flagged overload narrowing as a blocker for the Unit
7 flip. This lands the declaration-side metadata; callsite-side arity
synthesis is a separate gap we'll address if the parity gate surfaces
overload misresolution.
- `arity-metadata.ts` — reads `csharpMethodConfig.extractParameters`
and produces `{ parameterCount, requiredParameterCount,
parameterTypes }`. `params` variadic collapses parameterCount to
undefined (matches Python's `*args` treatment) and appends a literal
`'params'` marker to parameterTypes so the compatibility hook can
detect it without re-reading the AST. Default-valued parameters
contribute to optionalCount → requiredParameterCount = total − optional.
- `arity.ts` — `csharpArityCompatibility(def, callsite)` returns
compatible / incompatible / unknown. Mirrors Python's three-verdict
shape so the central registry's arity filter works without adapter
logic per-verdict.
- `captures.ts` — on every @declaration.method / @declaration.constructor
/ @declaration.function match, synthesize
@declaration.parameter-count, @declaration.required-parameter-count,
and @declaration.parameter-types captures. Covers method_declaration,
constructor_declaration, destructor_declaration, operator_declaration,
conversion_operator_declaration, and local_function_statement.
12 new tests: 5 on captures-side synthesis (method + params + types +
variadic + constructor + local function), 7 on the compatibility hook.
66/66 C# scope-resolution unit tests pass; tsc clean.
|
||
|---|---|---|
| .. | ||
| fixtures | ||
| helpers | ||
| integration | ||
| unit | ||
| utils | ||
| global-setup.ts | ||
| vitest.d.ts | ||