title: Type mismatch while using allCatch opt
body: <p>In order to avoid Java exceptions I'm using Scala's exception handling class.</p>
  
  <p>However, when compiling the following snippet:</p>
  
  <pre><code> import scala.util.control.Exception._
  
   val cls = classManifest[T].erasure
  
   // Invoke special constructor if it's available. Otherwise use default constructor.
   allCatch opt cls.getConstructor(classOf[Project]) match {
     case Some(con) =&gt;
       con.newInstance(project) // use constructor with one Project param
     case None =&gt;
       cls.newInstance // just use default constructor
   };
  </code></pre>
  
  <p>I receive the following error:</p>
  
  <pre><code> error: type mismatch;
      [scalac]  found   : java.lang.reflect.Constructor[_]
      [scalac]  required: java.lang.reflect.Constructor[_$1(in method init)] where
                type _$1(in method init)
      [scalac]     allCatch opt cls.getConstructor(classOf[Project]) match {
      [scalac]                                    ^
      [scalac] one error found
  </code></pre>
  
  <p>What's going on here and how can I fix it?</p>