summaryrefslogblamecommitdiff
path: root/test/files/pos/bug1075.scala
blob: 0f518b24db87773c9bf0816347f9a567d013092f (plain) (tree)
1
2
3
4
5
6
7
8






                                                   
                                        








                                                                            
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)
}