aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/t1075.scala
blob: 5f72957da1f7857541d0cdaa44c50f2d66e5f3a8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
}