title: Case class companion object generation error for compound type
body: <p>Defined empty trait Test:</p>
  
  <pre><code>trait Test
  </code></pre>
  
  <p>what used in compound type:</p>
  
  <pre><code>scala&gt; val a : Int with Test = 10.asInstanceOf[Int with Test]
  a: Int with Test = 10
  </code></pre>
  
  <p>and case class with parameter of compound type (like Unboxed Tagged Type):</p>
  
  <pre><code>scala&gt; case class Foo(a: Int with Test)
  error: type mismatch;
   found   : Double
   required: AnyRef
  Note: an implicit exists from scala.Double =&gt; java.lang.Double, but
  methods inherited from Object are rendered ambiguous.  This is to avoid
  a blanket implicit which would convert any scala.Double to any AnyRef.
  You may wish to use a type ascription: `x: java.lang.Double`.
  </code></pre>
  
  <p>But it is perfectly work for:</p>
  
  <pre><code>scala&gt; case class Foo(a: List[Int] with Test)
  defined class Foo
  </code></pre>
  
  <p>And no problem with method definition:</p>
  
  <pre><code>scala&gt; def foo(a: Int with Test) = ???
  foo: (a: Int with Test)Nothing
  </code></pre>
  
  <p>Scala version <strong><em>2.10.3</em></strong></p>
  
  <p>Is it normal compiler behaviour? </p>