diff options
author | Martin Odersky <odersky@gmail.com> | 2004-01-09 14:33:04 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2004-01-09 14:33:04 +0000 |
commit | 253a192ede3e994d6c832c124c7c02fb551d1006 (patch) | |
tree | c3fc90ddde9960bb4271ca758c58f92754dcc37b /test/files/neg | |
parent | 57bf1138b8fdaafc9c4ea1e883aba222ec8117cc (diff) | |
download | scala-253a192ede3e994d6c832c124c7c02fb551d1006.tar.gz scala-253a192ede3e994d6c832c124c7c02fb551d1006.tar.bz2 scala-253a192ede3e994d6c832c124c7c02fb551d1006.zip |
*** empty log message ***
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/182.check | 5 | ||||
-rw-r--r-- | test/files/neg/bug144.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug144.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug152.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug152.scala | 7 | ||||
-rw-r--r-- | test/files/neg/bug169.check | 7 | ||||
-rw-r--r-- | test/files/neg/bug169.scala | 14 | ||||
-rw-r--r-- | test/files/neg/bug228.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug228.scala | 13 | ||||
-rw-r--r-- | test/files/neg/dep.check | 4 | ||||
-rw-r--r-- | test/files/neg/dep.scala | 6 |
11 files changed, 70 insertions, 0 deletions
diff --git a/test/files/neg/182.check b/test/files/neg/182.check new file mode 100644 index 0000000000..d5370cd43b --- /dev/null +++ b/test/files/neg/182.check @@ -0,0 +1,5 @@ +bug182.scala:2: error overriding class Foo.I in class Foo; + class Bar.I in class Bar cannot override a class +class Bar extends Foo { class I; } + ^ +one error found diff --git a/test/files/neg/bug144.check b/test/files/neg/bug144.check new file mode 100644 index 0000000000..3342654b90 --- /dev/null +++ b/test/files/neg/bug144.check @@ -0,0 +1,4 @@ +bug144.scala:2: trait I is inherited twice +class C with I with I; + ^ +one error found diff --git a/test/files/neg/bug144.scala b/test/files/neg/bug144.scala new file mode 100644 index 0000000000..5702ed7224 --- /dev/null +++ b/test/files/neg/bug144.scala @@ -0,0 +1,2 @@ +trait I; +class C with I with I; diff --git a/test/files/neg/bug152.check b/test/files/neg/bug152.check new file mode 100644 index 0000000000..fddfbfa879 --- /dev/null +++ b/test/files/neg/bug152.check @@ -0,0 +1,4 @@ +bug152.scala:5: type foo.type escapes its defining scope as part of scala.Object { def a: foo.T } +class Bar(foo: Foo) { + ^ +one error found diff --git a/test/files/neg/bug152.scala b/test/files/neg/bug152.scala new file mode 100644 index 0000000000..c35fe00012 --- /dev/null +++ b/test/files/neg/bug152.scala @@ -0,0 +1,7 @@ +abstract class Foo { + type T; +} + +class Bar(foo: Foo) { + def a: foo.T = a; +} diff --git a/test/files/neg/bug169.check b/test/files/neg/bug169.check new file mode 100644 index 0000000000..4bd0c592fc --- /dev/null +++ b/test/files/neg/bug169.check @@ -0,0 +1,7 @@ +bug169.scala:8: not found: type TIMEOUT + case TIMEOUT() => { + ^ +bug169.scala:9: value ! is not a member of java.lang.Process + Child ! 'foo; + ^ +two errors found diff --git a/test/files/neg/bug169.scala b/test/files/neg/bug169.scala new file mode 100644 index 0000000000..28f1853a68 --- /dev/null +++ b/test/files/neg/bug169.scala @@ -0,0 +1,14 @@ +import scala.concurrent.Process._; + +class D() { + def start_listener(Child:Process) = { + var running = true; + while (running) { + receiveWithin(0) { + case TIMEOUT() => { + Child ! 'foo; + } + } + } + } +} diff --git a/test/files/neg/bug228.check b/test/files/neg/bug228.check new file mode 100644 index 0000000000..0dc891bced --- /dev/null +++ b/test/files/neg/bug228.check @@ -0,0 +1,4 @@ +/home/odersky/scala/test/pos/bug228.scala:11: constructor java.lang.reflect.AccessibleObject cannot be accessed in Foo + val o = new AccessibleObject; + ^ +one error found diff --git a/test/files/neg/bug228.scala b/test/files/neg/bug228.scala new file mode 100644 index 0000000000..55e4a8f818 --- /dev/null +++ b/test/files/neg/bug228.scala @@ -0,0 +1,13 @@ +import java.lang.reflect.AccessibleObject; + +class Test extends AccessibleObject { + + val o = new AccessibleObject; + +} + +class Foo { + + val o = new AccessibleObject; + +} diff --git a/test/files/neg/dep.check b/test/files/neg/dep.check new file mode 100644 index 0000000000..f6a2361121 --- /dev/null +++ b/test/files/neg/dep.check @@ -0,0 +1,4 @@ +dep.scala:5: type x.type escapes its defining scope as part of x.t + def foo(x: C, y: x.t): Object = null; + ^ +one error found diff --git a/test/files/neg/dep.scala b/test/files/neg/dep.scala new file mode 100644 index 0000000000..83c005b860 --- /dev/null +++ b/test/files/neg/dep.scala @@ -0,0 +1,6 @@ +object Test { + abstract class C { + type t; + } + def foo(x: C, y: x.t): Object = null; +}
\ No newline at end of file |