diff options
Diffstat (limited to 'test/files/run/t6028.scala')
-rw-r--r-- | test/files/run/t6028.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/t6028.scala b/test/files/run/t6028.scala new file mode 100644 index 0000000000..7611aee0fc --- /dev/null +++ b/test/files/run/t6028.scala @@ -0,0 +1,22 @@ +import scala.tools.partest._ +import java.io.{Console => _, _} + +object Test extends DirectTest { + + override def extraSettings: String = "-usejavacp -Xprint:lambdalift -d " + testOutput.path + + override def code = """class T(classParam: Int) { + | val field: Int = 0 + | def foo(methodParam: Int) = {val methodLocal = 0 ; () => classParam + field + methodParam + methodLocal } + | def bar(barParam: Int) = { trait MethodLocalTrait { print(barParam) }; object MethodLocalObject extends MethodLocalTrait; MethodLocalObject } + | def tryy(tryyParam: Int) = { var tryyLocal = 0; () => try { tryyLocal = tryyParam } finally () } + |} + |""".stripMargin.trim + + override def show(): Unit = { + // redirect err to out, for logging + Console.withErr(System.out) { + compile() + } + } +} |