summaryrefslogtreecommitdiff
path: root/test/files/pos/bug1075.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-05-30 15:36:57 +0000
committerMartin Odersky <odersky@gmail.com>2007-05-30 15:36:57 +0000
commit1cc6a768e075c0d764ae0625598b5d352ec1b4f2 (patch)
tree120dc52ad301cf2ed19296488723e6c527cde961 /test/files/pos/bug1075.scala
parent2dcbfa7d08d1063757713d77ff39557a89be3014 (diff)
downloadscala-1cc6a768e075c0d764ae0625598b5d352ec1b4f2.tar.gz
scala-1cc6a768e075c0d764ae0625598b5d352ec1b4f2.tar.bz2
scala-1cc6a768e075c0d764ae0625598b5d352ec1b4f2.zip
fixed bug 1123
Diffstat (limited to 'test/files/pos/bug1075.scala')
-rw-r--r--test/files/pos/bug1075.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/pos/bug1075.scala b/test/files/pos/bug1075.scala
new file mode 100644
index 0000000000..936ef72272
--- /dev/null
+++ b/test/files/pos/bug1075.scala
@@ -0,0 +1,17 @@
+class Directory(var dir_ : String)
+{
+ if (!dir_.startsWith("/")) {
+ throw new RuntimeException("Invalid directory")
+ }
+ dir_ = dir_.replaceAll("/{2,}", "/")
+
+ def this(serialized : Array[byte]) = {
+ this(new String(serialized, "UTF-8"))
+ }
+
+ def dir = dir_
+}
+
+object Test extends Directory("/bab/dkkd//dkkdkd//kdkdk") with Application {
+ println(dir)
+}