title: how to override a method when I have a "thunk"
body: <p>I have a thunk that take no parameter and return a List of case class(WhitelistRule), and a getWhitelist method that return a List of case class(WhitelistRule), how to override getWhitelist in main class?</p>
  
  <pre><code>trait AuthorizedServices {
    def getWhitelist: List[WhitelistRule]
  }
  
    case class WhitelistRule(accountId: String, ruleName: String)
  
    type WhitelistRuleThunk = () =&gt; List[WhitelistRule]
  
  class AuthorizedServicesImpl(Whitelist : =&gt; Map[String, WhitelistRuleThunk])
      extends AuthorizedServices {
  
      override def getWhitelist = {}
  
  }
  
  
  </code></pre>
  
  <p>I did this but it's type mismatch, required scala.List[WhitelistRule], found scala.List[WhitelistRuleThunk].</p>
  
  <pre><code>override def getWhitelist = {
       Whitelist.get("string").toList
    }
  </code></pre>