GitNexus/gitnexus/test
Rubén Molina 154b0b5ffe
fix(csharp): capture array_type parameters to resolve indexElement calls (#4099)
* test(csharp): expect array-typed parameter element calls to resolve (#4098)

repos[0].Save() and repos?[0].Save() on a User[] parameter should reach
User.Save. Fails until the C# query captures array_type parameters.

* fix(csharp): capture array_type parameters to resolve indexElement calls

C# parameters typed T[] emitted no @type-binding.parameter capture, so
repos[0].Save() on a User[] parameter was dropped as an unresolved
receiver. Add an (array_type) parameter pattern; the existing
elementTypeOf index route already peels User[] to User.

- Golden: two new capture groups, both Main(string[] args).
- Receiver-resolution baseline: csharp.indexElement VISIBLE-GAP ->
  RESOLVES; count arm unchanged.

Closes #4098

* fix(csharp): bind array parameters only for scoped owners and plain elements

Review follow-up for #4099.

- Restrict the array_type parameter pattern to method, constructor,
  local-function, operator and conversion-operator parameter lists, and
  to identifier or predefined-type elements. Generic elements
  (Box<User>[], Cell<User>[,]) produced wrong-owner CALLS edges, and
  delegate/indexer/anonymous-method/lambda parameters leaked their
  binding to same-named receivers in other files.
- Add csharp-array-parameter-binding.test.ts: exact User.Save against a
  same-named Repo field decoy, plus no-target rows for the direct array
  call, jagged and rank arrays, generic elements, and the delegate leak
  through params and lambda parameters.
- Re-baseline bench/scope-capture csharp: 3720a3d2 (2899 groups) ->
  38c6dc76 (2901 groups), the two Main(string[] args) parameters. Base
  control at 50228e1 reproduces the prior value.
- Docs: flip indexElement in csharp-ingestion-gaps.md, mark CSHARP-01
  resolved with the remaining shapes, add the C# move to the audit and
  BASELINE.md.

* test(csharp): document why params arrays stay unbound in CSHARP-01 rows

params T[] has no parameter node in tree-sitter-c-sharp, so the array
pattern cannot match it; say so in the test contract. Also describe the
decoy member names accurately.

---------

Co-authored-by: Molinadev30 <187445262+Molinadev30@users.noreply.github.com>
2026-11-26 19:08:46 +00:00
..
compat chore(deps): consolidate seven Dependabot updates (#4014) 2026-11-20 08:46:38 +00:00
fixtures fix(csharp): capture array_type parameters to resolve indexElement calls (#4099) 2026-11-26 19:08:46 +00:00
helpers fix(java): match javac resolution and move fixtures into conformance (#4056) 2026-11-25 18:03:32 +00:00
integration fix(csharp): capture array_type parameters to resolve indexElement calls (#4099) 2026-11-26 19:08:46 +00:00
unit fix(lbug): pin doctor probe DB max size to avoid 8 TiB mmap reservation (#4075) 2026-11-26 14:38:28 +00:00
utils fix(hooks): scope graph context to leading rg and grep searches (#4002) 2026-11-20 05:22:14 +00:00