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

                                    










                                            
class Casey1(val a: Int) {
  def isEmpty: Boolean = false
  def isEmpty(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)
  }
}