summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/bug287.scala12
-rw-r--r--test/files/pos/bug342.scala9
2 files changed, 21 insertions, 0 deletions
diff --git a/test/files/pos/bug287.scala b/test/files/pos/bug287.scala
new file mode 100644
index 0000000000..81a01951b2
--- /dev/null
+++ b/test/files/pos/bug287.scala
@@ -0,0 +1,12 @@
+object testBuf {
+ class mystream extends java.io.BufferedOutputStream(new java.io.FileOutputStream("/dev/null")) {
+ def w( x:String ):Unit = {
+ val foo = new Array[byte](2);
+
+ // write( byte[] ) is defined in FilterOutputStream, the superclass of BufferedOutputStream
+ super.write( foo ); // error
+
+ super.write( foo, 0, foo.length ); // this works however
+ }
+ }
+}
diff --git a/test/files/pos/bug342.scala b/test/files/pos/bug342.scala
new file mode 100644
index 0000000000..f7e318e0a8
--- /dev/null
+++ b/test/files/pos/bug342.scala
@@ -0,0 +1,9 @@
+object Main with Application {
+
+//object Foo extends Enumeration { // 1: OK !
+ object Foo extends Enumeration(0, "Bar") { // 2
+ val Bar = Value
+ }
+ import Foo._;
+ Console.println(Bar)
+}