aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t1075.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t1075.scala')
-rw-r--r--tests/untried/pos/t1075.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/untried/pos/t1075.scala b/tests/untried/pos/t1075.scala
new file mode 100644
index 000000000..5f72957da
--- /dev/null
+++ b/tests/untried/pos/t1075.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 App {
+ println(dir)
+}