summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/files/neg/bug550.check5
-rw-r--r--test/files/neg/bug565.check4
-rw-r--r--test/files/neg/bug565.scala3
-rw-r--r--test/files/pos/functions.scala12
4 files changed, 20 insertions, 4 deletions
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!")
+ }
+ }
+}