summaryrefslogblamecommitdiff
path: root/test/files/run/verify-ctor.scala
blob: 17e4f71be5f0257d5e5c16435ee075b6a04c272e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                         
class Foo(val str: String) {
  def this(arr: Array[Char]) = this({
    if (arr.length == 0) exit(1)
    new String(arr)
  })
}

object Test {
  def main(args: Array[String]) = {
    val t = new Foo(Array('a', 'b', 'c'))
    println(t.str)
  }
}