From 12053fa4d55497fc4df06afd67ba3762019969c3 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Mon, 14 Sep 2015 17:07:23 +0200 Subject: Enable more tests that pass --- tests/run/t8245.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/run/t8245.scala (limited to 'tests/run/t8245.scala') diff --git a/tests/run/t8245.scala b/tests/run/t8245.scala new file mode 100644 index 000000000..5a6fb9ff7 --- /dev/null +++ b/tests/run/t8245.scala @@ -0,0 +1,14 @@ +object Test { + def foo(o: Option[Int]): Int = { + lazy val i: Int = { + def local: Int = {if ("".isEmpty) return 42; -42} + assert(local == 42) + o.getOrElse(return -1) + } + i + 1 + } + + def main(args: Array[String]): Unit = { + assert(foo(None) == -1) + } +} -- cgit v1.2.3