From 9c45685549a490f73dbd9d9ce0ec5189a75c6453 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 8 Oct 2003 18:54:24 +0000 Subject: *** empty log message *** --- test/files/pos/bug115.scala | 8 ++++++++ test/files/pos/bug159.scala | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/files/pos/bug115.scala create mode 100644 test/files/pos/bug159.scala (limited to 'test/files/pos') 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; + } + } +} -- cgit v1.2.3