Skip to content

C#: calls through a member chain, through element access, or inside a constructor produce no edge (follow-up to #3797) #4246

Closed

Description

@ThatAblaze

Pre-flight checks

  • I have checked the Troubleshooting section in the README

What happened?

#3797's four call shapes now resolve. Three more common shapes still produce no calls edge
and no unresolved_calls entry when the callee is in another file, so the gap is silent.

Steps to reproduce

**a. Member chain** (`run.Sequence.Apply()`: a call on a field of a typed parameter)

`Model.cs`:


namespace Demo
{
    public class Sequence { public void Apply() { } }
    public class Run { public Sequence Sequence; }
}


`Controller.cs`:


namespace Demo
{
    public class Controller { public void Tick(Run run) { run.Sequence.Apply(); } }
}


Actual: no `calls` edge from `controller_demo_controller_tick`.
Expected: `controller_demo_controller_tick --calls--> model_demo_sequence_apply`.

**b. Element access** (`_configs[i].WriteIds()` on a typed array field; a second class declares
`WriteIds` too, so binding by name alone would be ambiguous)

`Config.cs`:


namespace Demo
{
    public class Config { public void WriteIds() { } }
    public class Other { public void WriteIds() { } }
}


`Anim.cs`:


namespace Demo
{
    public class Anim
    {
        private Config[] _configs;
        public void Save() { for (int i = 0; i < _configs.Length; i++) if (_configs[i] != null) _configs[i].WriteIds(); }
    }
}


Actual: no `calls` edge from `anim_demo_anim_save`.
Expected: `anim_demo_anim_save --calls--> config_demo_config_writeids` (not `Other.WriteIds`).

**c. Inside a constructor** (here to an inherited method; a constructor calling its own class's
method gets no edge either)

`Bound.cs`:


namespace Demo
{
    public abstract class Bound { protected object GameObjectOf(object o) { return o; } }
}


`BoundFunc.cs`:


namespace Demo
{
    public class BoundFunc : Bound
    {
        private object _go;
        public BoundFunc(object o) { _go = GameObjectOf(o); }
    }
}

Error output or graph output

Actual: no `calls` edge to `bound_demo_bound_gameobjectof`. The same call from an ordinary
method resolves.
Expected: an edge to `bound_demo_bound_gameobjectof`, from a constructor node if graphify adds
one, or from the type `boundfunc_demo_boundfunc`.

Graphify version

0.9.80

Operating System

Windows

Python Version

3.13

Installation Method

pip

Additional Environment Details

No response

Additional context

A local post-pass that types these receivers still recovers 313 call edges on 0.9.80 in a
~120-file Unity project (610 on 0.9.67), plus 49 calls into interface members and 191 interface
property accesses (#3800). By shape: base.M() 82 (comes from nested types; reported on
#4216), chains on a PascalCase receiver 76, typed local or parameter receivers 54, element
access 41, implicit calls (mostly inside constructors) 34, ?. 26. The three shapes above
reproduce in isolation. Simple versions of the typed-receiver and ?. cases resolve fine on
0.9.80, so those drops come from contexts not yet reduced to a minimal repro.

Activity

  1. added
    bug
    on Oct 8, 2026
  2. github-actions commented on Oct 8, 2026

    @github-actions

    Thanks for opening this issue, @ThatAblaze. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

  3. safishamsi commented on Oct 9, 2026

    @safishamsi
    Member

    Fixed by #4258 (thanks @Mpasha17), shipped in v0.9.83. Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions