title: Scala type signature failing with subclasses
body: <p>I have the following exception hierarchy defined:</p>
  
  <pre><code>/**
    * Base class for all exceptions in this library
    */
  trait MyAkkaHttpException {}
  
  /**
    * Thrown when there is a problem persisting data to a datastore
    */
  case class PersistenceException(message: String)
    extends Exception(message: String) with MyAkkaHttpException
  
  /**
    * Thrown when validation on an object fails
    * @param errors
    */
  case class ValidationException(message: String, errors: List[String])
    extends Exception(message: String) with MyAkkaHttpException
  </code></pre>
  
  <p>And the following code:</p>
  
  <pre><code>class ContactFormService(contactFormPersistor: ContactFormPersistor) {
  
    def handleForm(contactForm: ContactForm): ValidationNel[MyAkkaHttpException, String] = {
  
      contactForm.validate() match {
        case Success(_) =&gt; contactFormPersistor.persist(contactForm)
        case Failure(e) =&gt;
          new ValidationException(message = "Error validating contact form",
            errors = e.toList).failureNel[String]
      }
    }
  }
  </code></pre>
  
  <ul>
  <li><code>contactFormPersistor.persist</code> returns <code>ValidationNel[PersistenceException, String]</code></li>
  <li><code>contactForm.validate()</code> returns <code>ValidationNel[String, Boolean]</code></li>
  </ul>
  
  <p>The problem is <code>handleForm</code> won't accept that <code>PersistenceException</code> and <code>ValidationException</code> are subclasses of <code>MyAkkaHttpException</code>. What do I need to do to make it correctly realise that those return types are valid subclasses?</p>