diff options
author | Martin Odersky <odersky@gmail.com> | 2006-04-11 16:42:39 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-04-11 16:42:39 +0000 |
commit | 73ff6fcfc2eea1875356d4e1b26d615053ab9130 (patch) | |
tree | ce3852029829847b4cf6ab6c7b5366752e097a4d /test/files | |
parent | e3fc3506c7c918aba5cc7c3baabca95de8f6ac4c (diff) | |
download | scala-73ff6fcfc2eea1875356d4e1b26d615053ab9130.tar.gz scala-73ff6fcfc2eea1875356d4e1b26d615053ab9130.tar.bz2 scala-73ff6fcfc2eea1875356d4e1b26d615053ab9130.zip |
Added some tests
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/bug550.check | 5 | ||||
-rw-r--r-- | test/files/neg/bug565.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug565.scala | 3 | ||||
-rw-r--r-- | test/files/pos/functions.scala | 12 |
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!") + } + } +} |