title: scala case class equals (==) not working as expected
body: <p>I must be missing something silly here. I have this:</p>
  
  <pre><code>case class Color(val rgb:Int) {
     private val c = rgb - 0xff000000
     val r = (c &amp; 0xff0000) &gt;&gt; 16
     val g = (c &amp; 0x00ff00) &gt;&gt; 8
     val b = (c &amp; 0x0000ff)
  }
  
  case object Red extends Color(0xffff0000)
  case object Green extends Color(0xff00ff00)
  case object Blue extends Color(0xff0000ff)
  </code></pre>
  
  <p>Then I expect this to print <strong>true</strong>:</p>
  
  <pre><code>val c = Color(0xff00ff00)
  println(c == Green)
  </code></pre>
  
  <p>Why doesn't it??</p>