From 89bacb9c25a58454ff1878e67f7ea07ffc8c269f Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Tue, 12 May 2015 18:30:53 +0200 Subject: Run tests as they were in scala. --- tests/pending/run/t5610a.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/pending/run/t5610a.scala (limited to 'tests/pending/run/t5610a.scala') diff --git a/tests/pending/run/t5610a.scala b/tests/pending/run/t5610a.scala new file mode 100644 index 000000000..f20b29576 --- /dev/null +++ b/tests/pending/run/t5610a.scala @@ -0,0 +1,19 @@ +object Test extends App { + class Result(_str: => String) { + lazy val str = _str + } + + def foo(str: => String)(i: Int) = new Result(str) + + def bar(f: Int => Result) = f(42) + + var test: String = null + val result = bar(foo(test)) + test = "bar" + + if (result.str == null) { + println("Destroy ALL THE THINGS!!!") + } else { + println("Stroke a kitten") + } +} \ No newline at end of file -- cgit v1.2.3