reactiveui / Splat.DI.SourceGenerator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Registration calls from generic type result in compile-time error

MGRussell opened this issue · comments

public static void RegisterService<TConcrete>()
{
    SplatRegistrations.Register<TConcrete>();
}

The above method results in a SPLATDI001 error (TConcrete has more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute) that is not related to the type being used. The error appears even if the method is not called.

commented

The scenario won't work. It can definitely have a better error message though

The splat registrations calls need concrete types not generics due to the way source generators work

So calling within another generic method is unsupported

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.