title: Dagger 2 constructor injection in kotlin with Named arguments
body: <p>I have this dependency:</p>
  
  <pre><code>@Singleton
  class SpiceMix @Inject constructor(@field:[Named("oregano")] private val oregano: Spice,
                                     @field:[Named("sage")] private val sage: Spice,
                                     @field:[Named("rosemary")] private val rosemary: Spice) 
  </code></pre>
  
  <p>And a module to fulfill its dependencies:</p>
  
  <pre><code>@Module
  class SpiceModule {
  
      @Provides
      @Named("oregano")
      @Singleton
      fun provideOregano(): Spice = Oregano()
  
      @Provides
      @Named("sage")
      @Singleton
      fun provideSage(): Spice = Sage()
  
      @Provides
      @Named("rosemary")
      @Singleton
      fun provideRosemary(): Spice = Rosemary()
  </code></pre>
  
  <p>The <code>SpiceMix</code> is then injected in various locations of my app.</p>
  
  <p>However, this does not compile and I get an error:</p>
  
  <pre><code>Spice cannot be provided without an @Provides-annotated method
  </code></pre>
  
  <p>I think the @Named annotations do not quite work in my constructor signature. I am not quite sure how I can make it work.</p>
  
  <p>Note: this compiles fine if I ditch the Named annotations and change the types of the constructor parameters to their concrete forms. However, Spice is an interface, and I need it for mocking purposes in my tests.</p>
  
  <p>What can I do?</p>