diff options
Diffstat (limited to 'test/files/run/t2636.scala')
-rw-r--r-- | test/files/run/t2636.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/run/t2636.scala b/test/files/run/t2636.scala index 8c49a733fd..3271f79ffc 100644 --- a/test/files/run/t2636.scala +++ b/test/files/run/t2636.scala @@ -3,28 +3,28 @@ object Test type Foo = { def update(x: Int, value: String): Unit } type Foo2 = { def update(x: Int, value: String): Int } type Foo3 = { def update(x: Int, value: String): Array[Int] } - + def alen() = { type L1 = { def length: Int } def len(p: L1) = p.length val x: L1 = Array(1,2,3) len(x) } - + type A1 = { def apply(x: Int): String } def arrApply(a: A1, x: Int) = a(x) - + def main(args: Array[String]): Unit = { val arr = new Array[String](3) val p1: Foo = arr def a1 = p1(0) = "b" val p2: Foo2 = new { def update(x: Int, value: String) = { p1(1) = "o" ; 1 } } - def a2 = p2(0) = "c" - + def a2 = p2(0) = "c" + val p3: Foo3 = new { def update(x: Int, value: String) = { p1(2) = "b" ; Array(1) } } def a3 = p3(10) = "hi mom" - + a1 ; a2 ; a3 ; assert(arr.mkString == "bob") |