diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-05-08 00:01:53 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-05-08 00:02:56 +0200 |
commit | 8e7d3bef6d995a7d40054df8f2ca2ab0c285ce7f (patch) | |
tree | 053c1a32da78a15677febc3f94f448a4ae78fb3c /test/pending/run/t5610a.scala | |
parent | 7cac6334d4437ff54c4979799574045501f64135 (diff) | |
download | scala-8e7d3bef6d995a7d40054df8f2ca2ab0c285ce7f.tar.gz scala-8e7d3bef6d995a7d40054df8f2ca2ab0c285ce7f.tar.bz2 scala-8e7d3bef6d995a7d40054df8f2ca2ab0c285ce7f.zip |
test for SI-5610
Diffstat (limited to 'test/pending/run/t5610a.scala')
-rw-r--r-- | test/pending/run/t5610a.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/pending/run/t5610a.scala b/test/pending/run/t5610a.scala new file mode 100644 index 0000000000..f20b295762 --- /dev/null +++ b/test/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 |