summaryrefslogtreecommitdiff
path: root/test/files/pos/bug359.scala
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-08-25 15:06:42 +0000
committerpaltherr <paltherr@epfl.ch>2004-08-25 15:06:42 +0000
commit2f30b9e5cf7111c83e96d569cc54da3cc2b6b0f3 (patch)
treece779b936a7c238955f538ceba34cb4979383837 /test/files/pos/bug359.scala
parentd93bfce648dc7e23be7e80312988ac0a7109d497 (diff)
downloadscala-2f30b9e5cf7111c83e96d569cc54da3cc2b6b0f3.tar.gz
scala-2f30b9e5cf7111c83e96d569cc54da3cc2b6b0f3.tar.bz2
scala-2f30b9e5cf7111c83e96d569cc54da3cc2b6b0f3.zip
- Added bug 359
Diffstat (limited to 'test/files/pos/bug359.scala')
-rw-r--r--test/files/pos/bug359.scala30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/files/pos/bug359.scala b/test/files/pos/bug359.scala
new file mode 100644
index 0000000000..6ce4640998
--- /dev/null
+++ b/test/files/pos/bug359.scala
@@ -0,0 +1,30 @@
+// $Id$
+
+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;
+}