Skip to content

[Bug]: C#: a generic and a non-generic type of the same name share one node #4249

Closed

Description

@ThatAblaze

Pre-flight checks

  • I have checked the Troubleshooting section in the README

What happened?

Effect and Effect<T> get the same node id, so the generic's declaration and the non-generic's
merge, and Effect<T> : Effect becomes a self-loop.

Steps to reproduce

`Effects.cs`:


namespace Demo
{
    public abstract class Effect { public virtual int ReadSlot(string p) { return 0; } }
    public abstract class Effect<T> : Effect where T : unmanaged { }
    public abstract class Tween<T> : Effect<T> where T : unmanaged
    {
        public override int ReadSlot(string p) { return base.ReadSlot(p) + 1; }
    }
}

Error output or graph output

### Actual


effects_demo_effect --inherits--> effects_demo_effect
effects_demo_tween --inherits--> effects_demo_effect


### Expected

Two nodes, for example `effects_demo_effect` and `effects_demo_effect_1` (the arity in the id,
the way C# metadata names it ``Effect`1``), with `Effect<T> --inherits--> Effect` and
`Tween<T> --inherits--> Effect<T>`.

Graphify version

0.9.80

Operating System

Windows

Python Version

3.13

Installation Method

pip

Additional Environment Details

No response

Additional context

The generic-over-non-generic base pair is a common C# pattern (Effect<T> : Effect,
Comparer<T> : Comparer). Every subclass then appears to inherit the non-generic base directly,
and members declared on the generic land on the same node as the non-generic's.

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 #4255 (thanks @ayushcodes10), 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