diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/files/run/private-inline.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'test/files/run/private-inline.scala')
-rw-r--r-- | test/files/run/private-inline.scala | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/files/run/private-inline.scala b/test/files/run/private-inline.scala index 5181ac8ba3..a45300b026 100644 --- a/test/files/run/private-inline.scala +++ b/test/files/run/private-inline.scala @@ -2,7 +2,7 @@ final class A { private var x1 = false var x2 = false - + // manipulates private var @inline private def wrapper1[T](body: => T): T = { val saved = x1 @@ -17,35 +17,35 @@ final class A { try body finally x2 = saved } - + // not inlined def f1a() = wrapper1(5) // inlined! def f1b() = identity(wrapper1(5)) - + // not inlined def f2a() = wrapper2(5) // inlined! - def f2b() = identity(wrapper2(5)) + def f2b() = identity(wrapper2(5)) } object Test { def methodClasses = List("f1a", "f1b", "f2a", "f2b") map ("A$$anonfun$" + _ + "$1") - + def main(args: Array[String]): Unit = { val a = new A import a._ println(f1a() + f1b() + f2a() + f2b()) - + // Don't know how else to test this: all these should have been // inlined, so all should fail. methodClasses foreach { clazz => - + val foundClass = ( try Class.forName(clazz) catch { case _ => null } ) - + assert(foundClass == null, foundClass) } } |