C#: type refs to a class with ONE declaration resolve as ambiguous (generic class + same-name constructor?) #369

Closed
opened 2026-10-14 08:50:14 +02:00 by buildagent · 0 comments
Member

Field report (local-ai-server, E3 index: C# WinForms/WPF ERP, 20,132 files, 0.37.1 8df22f69, all tiers ran)

  • ParaGroupBase has exactly one class symbol: Source/Framework/TIMELINE.FRAMEWORK/Data/Para/ParaGroupBase.cs:7, public abstract class ParaGroupBase<T> where T : new().
    • It shows ref_count: 0, name_fallback_count: 227.
    • All 226 type refs to it in TypedPara.cs are unresolved with reason ambiguous.
  • Its ~225 subclasses behave the same. For example, ABSCHLAGSRGGroup is declared once (TypedPara.cs:6878, public class ABSCHLAGSRGGroup : ParaGroupBase<TypedPara>) and has ref_count 0, and its 2 refs are ambiguous:
    public ABSCHLAGSRGGroup ABSCHLAGSRG { get { return new ABSCHLAGSRGGroup(this); } }
    

Hypotheses (unverified)

  1. The class and its own constructor (same name, C# extractor emits both) are counted as two candidates for a type ref.
  2. The generic arity / type-argument text splits the name.

To do

  • Reproduce with a minimal fixture: a generic abstract base, a subclass with a constructor, a new Sub(this) call, and : Base<T> references.
  • Check resolution_gaps reasons and which candidates the ambiguity counted.
  • Fix so a type ref never counts a constructor as a competing type candidate (or the equivalent cause).
  • Measure: bind diff on the corpus (cs-dapper and any C# repo in tier 3), plus a hand-checked sample. precision_gate stays 7/7, phantom 0.

Related: #370 (inherited members) and #371 (enclosing-type scope), from the same report.

## Field report (local-ai-server, E3 index: C# WinForms/WPF ERP, 20,132 files, 0.37.1 8df22f69, all tiers ran) - `ParaGroupBase` has exactly **one** class symbol: `Source/Framework/TIMELINE.FRAMEWORK/Data/Para/ParaGroupBase.cs:7`, `public abstract class ParaGroupBase<T> where T : new()`. - It shows `ref_count: 0, name_fallback_count: 227`. - All 226 type refs to it in `TypedPara.cs` are `unresolved` with reason **`ambiguous`**. - Its ~225 subclasses behave the same. For example, `ABSCHLAGSRGGroup` is declared once (`TypedPara.cs:6878`, `public class ABSCHLAGSRGGroup : ParaGroupBase<TypedPara>`) and has `ref_count 0`, and its 2 refs are `ambiguous`: ```csharp public ABSCHLAGSRGGroup ABSCHLAGSRG { get { return new ABSCHLAGSRGGroup(this); } } ``` ## Hypotheses (unverified) 1. The class and its own constructor (same name, C# extractor emits both) are counted as two candidates for a **type** ref. 2. The generic arity / type-argument text splits the name. ## To do - Reproduce with a minimal fixture: a generic abstract base, a subclass with a constructor, a `new Sub(this)` call, and `: Base<T>` references. - Check `resolution_gaps` reasons and which candidates the ambiguity counted. - Fix so a type ref never counts a constructor as a competing type candidate (or the equivalent cause). - Measure: bind diff on the corpus (cs-dapper and any C# repo in tier 3), plus a hand-checked sample. `precision_gate` stays 7/7, phantom 0. Related: #370 (inherited members) and #371 (enclosing-type scope), from the same report.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index#369
No description provided.