You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: C#: var x = Get<T>(...) leaves x untyped, so x.Method() has no calls edge #4266
var report = ServiceFactory.Get<IReport>(scope) leaves report untyped, so report.Build(...) has no calls edge. The same call is linked when the local is written IReport report = ....
Checked the Troubleshooting section. This is a code-only AST extract (graphify extract . --code-only --no-cluster), not an install, PATH, LLM, partial-extract, or ghost-duplicate problem. The same gap is still in the v0.9.82 source: a var is typed only from new T().
This is separate from #2624 / #2676. Those are about the call Get<T>(...) itself. After that call is linked, the variable on the left is still untyped.
Suggested rule
When the called method resolves to one declaration, type the var as that method's return type with the call-site type arguments substituted. T Get<T>() called as Get<IReport>() types the variable as IReport. List<T> CreateList<T>() called as CreateList<Item>() types it as List<Item>. Leave the variable untyped when the declaration is missing, an overload cannot be chosen, or an inferred type argument cannot be recovered.
Steps to reproduce
public interface IReport
{
string Build(string name);
}
public static class ServiceFactory
{
public static T Get<T>(object scope) where T :new() => new T();
}
public class Report : IReport
{
public string Build(string name) => name;
}
public class Consumer
{
public string Run(object scope)
{
var report = ServiceFactory.Get<IReport>(scope);return report.Build("daily");
}
}
graphify extract . --code-only --no-cluster
### Expected
calls Consumer.Run() ->IReport.Build()
Error output or graph output
### Actual
`Consumer.Run()` has no `calls` edge to `Build`. The same call is linked when the local is written as `IReport report = ...`.
Graphify version
0.9.75
Operating System
Windows
Python Version
3.13
Installation Method
pip
Additional Environment Details
pip install --user
Additional context
The only var recovery is the object_creation_expression branch in _csharp_method_receiver_types (graphify/extractors/engine.py). A generic invocation initializer is bound with no type. Confirmed on the installed 0.9.75 package and in the v0.9.82 tag.
Activity
github-actions commentedon Oct 9, 2026
Thanks for opening this issue, @dvdrelin. 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.
fix(csharp): type a var from the called method's return type (#4266)
safishamsi commentedon Oct 12, 2026
Fixed in v0.9.87 (
graphifyy 0.9.87on PyPI) via #4268.fix(csharp): resolve a member access to the receiver type's property (G…