Skip to content

[Bug]: SplatRegistrations.RegisterConstant is looking for constructor with DependencyInjectionConstructorAttribute #292

@CyLuGh

Description

@CyLuGh

Describe the bug 🐞

Hello,

When upgrading from v1 to v2, I encounter an issue: even though I instantiate an object and register it as a constant dependency, the generator still tries to find an injection constructor. This fails because the class has multiple constructors, none having the proper attribute (which I can't add, this is another library I'm using).

Step to reproduce

var tracker = new Tracker();
SplatRegistrations.RegisterConstant(tracker);
SplatRegistrations.SetupIOC();

will give this error:

Jot.Tracker has more than one constructor and one hasn't been marked with DependencyInjectionConstructorAttribute

Expected behavior

There shouldn't be any compilation error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions