blob: 17e4f71be5f0257d5e5c16435ee075b6a04c272e (
plain) (
tree)
|
|
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)
}
}
|