title: How to inject a trait with macwire
body: <p>I have a Scala trait</p>
  
  <pre><code>trait UserRepository {
    def findByEmail(email: String): User
  }
  </code></pre>
  
  <p>I would like to inject this into a service with MacWire</p>
  
  <pre><code>class AccountService(){
    val userRepo = wire[UserRepository]
  }
  </code></pre>
  
  <p>And then use it in a test or class</p>
  
  <pre><code>class AccountServiceSpec {
    val userRepo = new UserRepositoryImpl()
    val accountSvc = new AccountService() //&lt;--not manually injecting repo in service constructor
  }
  </code></pre>
  
  <p>but I'm getting a compile error in the service class</p>
  
  <blockquote>
    <p>Cannot find a public constructor nor a companion object for
    accounts.repository.UserRepository</p>
  </blockquote>