From 1cc6a768e075c0d764ae0625598b5d352ec1b4f2 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 30 May 2007 15:36:57 +0000 Subject: fixed bug 1123 --- test/files/pos/bug1075.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/files/pos/bug1075.scala (limited to 'test/files/pos/bug1075.scala') 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) +} -- cgit v1.2.3