diff options
author | Martin Odersky <odersky@gmail.com> | 2003-10-08 18:54:24 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-10-08 18:54:24 +0000 |
commit | 9c45685549a490f73dbd9d9ce0ec5189a75c6453 (patch) | |
tree | 70d1893b420b79c4b5dd03d68a7dcb4cd68ce32f /test/files/pos | |
parent | 8ee55188d8c59c69924fb0a914adf645dc682fdf (diff) | |
download | scala-9c45685549a490f73dbd9d9ce0ec5189a75c6453.tar.gz scala-9c45685549a490f73dbd9d9ce0ec5189a75c6453.tar.bz2 scala-9c45685549a490f73dbd9d9ce0ec5189a75c6453.zip |
*** empty log message ***
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/bug115.scala | 8 | ||||
-rw-r--r-- | test/files/pos/bug159.scala | 22 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/files/pos/bug115.scala b/test/files/pos/bug115.scala new file mode 100644 index 0000000000..7e83038c7c --- /dev/null +++ b/test/files/pos/bug115.scala @@ -0,0 +1,8 @@ +class S[A](f: A => A, x: A) { + System.out.println(f(x)); +} +class T[A](f: A => A, y: A) extends S(x: A => f(x), y) { +} +object Test with Executable { + new T[int](x: int => x * 2, 1); +} diff --git a/test/files/pos/bug159.scala b/test/files/pos/bug159.scala new file mode 100644 index 0000000000..d6cdb97b47 --- /dev/null +++ b/test/files/pos/bug159.scala @@ -0,0 +1,22 @@ +object foo { + + // the problem seems to appear only + // if "val _" is in the body of a case + def cooked( ckd:StringBuffer ):Unit = + 'a'.match { + case '-' => + val _ = ckd.append( '_' ); + case 'v' => + val _ = ckd.append( '_' ); + } + +} +object foo1 { + def f():Unit = { + 1.match { + case 2 => val _ = 1; + case 3 => val _ = 2; + case 4 => val _ = 2; + } + } +} |