Splat.DI.SourceGenerator icon indicating copy to clipboard operation
Splat.DI.SourceGenerator copied to clipboard

SPLATDI001 produced on non-DI "Register" method calls

Open Govorunb opened this issue 1 year ago • 0 comments

Describe the bug 🐞

Any method invocation on a method named e.g. Register is checked as if it was a DI registration. This produces SPLATDI001 diagnostics on completely unrelated classes.

Step to reproduce

class C
{
    static C Instance = new();
    C()
    {
        Instance.Register<C>(); // SPLATDI001
    }
    C(C c) { }
    void Register<T>() { }
}

Reproduction repository

N/A

Expected behavior

No SPLATDI001 on calls that aren't Splat.SplatRegistrations.Register*.

Screenshots 🖼️

No response

IDE

Visual Studio 2022

Operating system

N/A

Version

No response

Device

No response

ReactiveUI Version

N/A

Additional information ℹ️

No response

Govorunb avatar Sep 19 '24 08:09 Govorunb