aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t5608.scala
blob: 43e912122bbae73b5a81c72a8d02a05e4d9521b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
object Test {
  def main(args:Array[String]): Unit = {
    val ns = Array(3L, 3L, 3L)
    val a1: A = new A(ns(0))
    val a2: A = new A(ns(0))
    println(a1 + a2)
  }
}

class A(val u: Long) extends AnyVal {
  def +(other: A) = new A(other.u + u)
}