summaryrefslogtreecommitdiff
path: root/test/files/pos/t359.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t359.scala')
-rw-r--r--test/files/pos/t359.scala28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/files/pos/t359.scala b/test/files/pos/t359.scala
new file mode 100644
index 0000000000..11233c3ba4
--- /dev/null
+++ b/test/files/pos/t359.scala
@@ -0,0 +1,28 @@
+object Bug359 {
+ class C;
+ def f1(xs: List[C]): C = {
+ g {
+ xs =>
+ if (false) {
+ f1(xs)
+ } else {
+ val a: C = null;
+ val b: C = null;
+ if (xs.isEmpty) a else b
+ }
+ }
+ }
+ def f2(xs: List[C]): C = {
+ g {
+ xs =>
+ if (false) {
+ val a: C = null;
+ val b: C = null;
+ if (xs.isEmpty) a else b
+ } else {
+ f2(xs);
+ }
+ }
+ }
+ private def g(op: List[C] => C): C = null;
+}