summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2010-06-14 11:27:45 +0000
committerIulian Dragos <jaguarul@gmail.com>2010-06-14 11:27:45 +0000
commitf492b003234d3c6e03fb0c1e71ac1eb5269f66a4 (patch)
tree5cc0b044a0587f4a1faf3ac7d4f4dcb2cd7b9523 /test/files
parentd3a77021622a2ab214020cc9186480a1fe3e850c (diff)
downloadscala-f492b003234d3c6e03fb0c1e71ac1eb5269f66a4.tar.gz
scala-f492b003234d3c6e03fb0c1e71ac1eb5269f66a4.tar.bz2
scala-f492b003234d3c6e03fb0c1e71ac1eb5269f66a4.zip
Closes #3558.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/spec-constr.check2
-rw-r--r--test/files/run/spec-constr.scala14
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/spec-constr.check b/test/files/run/spec-constr.check
new file mode 100644
index 0000000000..29d70d9de8
--- /dev/null
+++ b/test/files/run/spec-constr.check
@@ -0,0 +1,2 @@
+hello?
+goodbye
diff --git a/test/files/run/spec-constr.scala b/test/files/run/spec-constr.scala
new file mode 100644
index 0000000000..4c80d0954d
--- /dev/null
+++ b/test/files/run/spec-constr.scala
@@ -0,0 +1,14 @@
+object Test {
+ class E[@specialized(Int) A](var f: A => Boolean) {
+ def this() = this(null)
+
+ println("hello?")
+ if (f == null) f = { _ => false }
+ }
+
+ def main(args: Array[String]) {
+ new E[Int]
+ println("goodbye")
+ }
+}
+