Skip to content

Analyzer requiring explicit type when binding func to interface #44

@JohanLarsson

Description

@JohanLarsson

Before:

kernel.Bind<I1>(() => new C());

Fixed:

kernel.Bind<I1, C>(() => new C());

Reason for this is that func.Method.ReturnType is I1 and hence calling container.Get() will use default resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions