Overloading isDefined or get as in the following example crashes dotc on this assertion:
class Casey1(val a: Int) {
def isDefined: Boolean = true
def isDefined(x: Int): Boolean = ???
def get: Int = a
def get(x: Int): String = ???
}
object Casey1 { def unapply(a: Casey1) = a }
object Test {
def main(args: Array[String]): Unit = {
val c @ Casey1(x) = new Casey1(0)
assert(x == c.get)
}
}