diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2008-11-19 09:30:13 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2008-11-19 09:30:13 +0000 |
commit | 1f84f1d776f61a1ef2325337172a08378d1966e5 (patch) | |
tree | 607073a96e4c41b42cdc29c5f05416d185449dd2 /test/files | |
parent | 6243483556fc4f4b1fab93dedc422815c12b6efa (diff) | |
download | scala-1f84f1d776f61a1ef2325337172a08378d1966e5.tar.gz scala-1f84f1d776f61a1ef2325337172a08378d1966e5.tar.bz2 scala-1f84f1d776f61a1ef2325337172a08378d1966e5.zip |
Added back test for #1453.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/verify-ctor.check | 1 | ||||
-rw-r--r-- | test/files/run/verify-ctor.scala | 13 |
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..17e4f71be5 --- /dev/null +++ b/test/files/run/verify-ctor.scala @@ -0,0 +1,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) + } +} |