Compile error in filter with Slick mapped column type
<p>I have trouble filtering on a custom type using slick-3.1.1. The following, self contained example, illustrates my problem:</p>

<pre><code>object IllustrateSlickQuestion {
  val sqlDriver = slick.driver.PostgresDriver
  import sqlDriver.api._

  trait SomeBaseType {
    def value: Int
  }

  object SomeBaseType {
    def apply(value: Int): SomeBaseType = SomeType(value)
  }

  case class SomeType(value: Int) extends SomeBaseType

  implicit val someBaseTypeMappedColumnType = MappedColumnType.base[SomeBaseType, Int](_.value, SomeBaseType.apply)

  class SomeTable(tag: Tag) extends Table[(SomeBaseType, Option[SomeBaseType])](tag, "my_table") {
    def someColumn = column[SomeBaseType]("some_column")
    def someNullableColumn = column[Option[SomeBaseType]]("some_nullable_column")
    def * = (someColumn, someNullableColumn)
  }

  val someTable = TableQuery[SomeTable]

  // These selects work:
  val compilingSelect1 = someTable.filter(_.someColumn inSet Set(SomeType(42)))
  val compilingSelect2 = someTable.filter(_.someNullableColumn inSet Set(SomeType(42)))

  // Does not compile:
  //   [error] type mismatch;
  //   [error]   found   : IllustrateSlickQuestion.SomeType
  //   [error]   required: slick.lifted.Rep[?]
  //   [error]    val brokenSelect1 = someTable.filter(_.someColumn === SomeType(42))
  val brokenSelect1 = someTable.filter(_.someColumn === SomeType(42))

  // Does not compile either:
  //  [error] see above
  val brokenSelect2 = someTable.filter(_.someNullableColumn === SomeType(42))
}
</code></pre>

<p>This problem goes away if I use <code>SomeType</code> instead of <code>SomeBaseType</code> in my definitions and in the <code>MappedColumnType</code>. That however is not an option in the code I really care about, since there <code>SomeBaseType</code> represents an enumeration. I'm therefore stuck with using <code>inSet</code> instead of <code>===</code> as a workaround.</p>

<p>Am I doing anything wrong, or is this a bug in Slick?</p>