aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/i1540b.scala
blob: f4408b0c7aaba775a4959f21f04e98df41ffc7ce (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
                           

                                  










                                                  
class Casey1[T](val a: T) {
  def isEmpty: Boolean = false
  def isEmpty(x: T): Boolean = ???
  def get: T = a
  def get(x: T): String = ???
}
object Casey1 { def unapply[T](a: Casey1[T]) = a }

object Test {
  def main(args: Array[String]): Unit = {
    val c @ Casey1(x) = new Casey1(0)
    assert(x == c.get)
  }
}