Skip to content

ScalaMapBinder does not support traits as type #50

@Vadi

Description

@Vadi

Suppose you've a trait that you will implement in child classes -

trait AppMessage {}

Given this injections

    val mapBinder = ScalaMapBinder.newMapBinder[String, AppMessage](binder)
    mapBinder.addBinding("A").toInstance(new AppMessageSampleA)
    mapBinder.addBinding("B").toInstance(new AppMessageSampleB)

and calling them with val map = injector.instance[im.Map[String, AppMessage]] throws not found exception.

Need to support traits

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