diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t5608.check | 1 | ||||
-rw-r--r-- | test/files/run/t5608.scala | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/t5608.check b/test/files/run/t5608.check new file mode 100644 index 0000000000..ba70d21701 --- /dev/null +++ b/test/files/run/t5608.check @@ -0,0 +1 @@ +A@6 diff --git a/test/files/run/t5608.scala b/test/files/run/t5608.scala new file mode 100644 index 0000000000..19b3681932 --- /dev/null +++ b/test/files/run/t5608.scala @@ -0,0 +1,12 @@ +object Test { + def main(args:Array[String]) { + 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) +} |