From 73ff6fcfc2eea1875356d4e1b26d615053ab9130 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 11 Apr 2006 16:42:39 +0000 Subject: Added some tests --- test/files/neg/bug550.check | 5 +---- test/files/neg/bug565.check | 4 ++++ test/files/neg/bug565.scala | 3 +++ test/files/pos/functions.scala | 12 ++++++++++++ 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 test/files/neg/bug565.check create mode 100644 test/files/neg/bug565.scala create mode 100644 test/files/pos/functions.scala (limited to 'test') diff --git a/test/files/neg/bug550.check b/test/files/neg/bug550.check index ad4f061d1f..25367af0e5 100644 --- a/test/files/neg/bug550.check +++ b/test/files/neg/bug550.check @@ -1,10 +1,7 @@ -bug550.scala:6 error: class List takes type parameters - def sum[a](xs: List)(implicit m: Monoid[a]): a = - ^ bug550.scala:6 error: class List takes type parameters def sum[a](xs: List)(implicit m: Monoid[a]): a = ^ bug550.scala:8 error: no implicit argument matching parameter type Monoid[scala.All] was found. sum(List(1,2,3)) ^ -three errors found +two errors found diff --git a/test/files/neg/bug565.check b/test/files/neg/bug565.check new file mode 100644 index 0000000000..673e112058 --- /dev/null +++ b/test/files/neg/bug565.check @@ -0,0 +1,4 @@ +bug565.scala:2 error: only classes can have declared but undefined members + var s0: String + ^ +one error found diff --git a/test/files/neg/bug565.scala b/test/files/neg/bug565.scala new file mode 100644 index 0000000000..9a4732fcc3 --- /dev/null +++ b/test/files/neg/bug565.scala @@ -0,0 +1,3 @@ +object test { + var s0: String +} diff --git a/test/files/pos/functions.scala b/test/files/pos/functions.scala new file mode 100644 index 0000000000..3a7ce16f37 --- /dev/null +++ b/test/files/pos/functions.scala @@ -0,0 +1,12 @@ +import scala.concurrent.Process + +object Test { + + def foo() = { + val x = 1; + Process.receive { + case "abc" if x == 2 => + System.out.println("hi!") + } + } +} -- cgit v1.2.3