summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2008-11-18 11:20:05 +0000
committerIulian Dragos <jaguarul@gmail.com>2008-11-18 11:20:05 +0000
commit7f72290295636bc98822dee5994260c480ff42bd (patch)
tree04e48dab81f048ef34a8cfe0eaee23fbd826d61a /test/files/run
parentbc452c0ef2889e1071e1685688771900903b8527 (diff)
downloadscala-7f72290295636bc98822dee5994260c480ff42bd.tar.gz
scala-7f72290295636bc98822dee5994260c480ff42bd.tar.bz2
scala-7f72290295636bc98822dee5994260c480ff42bd.zip
Fixed #1453.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/verify-ctor.check1
-rw-r--r--test/files/run/verify-ctor.scala13
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/verify-ctor.check b/test/files/run/verify-ctor.check
new file mode 100644
index 0000000000..8baef1b4ab
--- /dev/null
+++ b/test/files/run/verify-ctor.check
@@ -0,0 +1 @@
+abc
diff --git a/test/files/run/verify-ctor.scala b/test/files/run/verify-ctor.scala
new file mode 100644
index 0000000000..bbba17e821
--- /dev/null
+++ b/test/files/run/verify-ctor.scala
@@ -0,0 +1,13 @@
+class Test(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 Test(Array('a', 'b', 'c'))
+ println(t.str)
+ }
+}