aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/constrs.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/constrs.scala')
-rw-r--r--tests/untried/neg/constrs.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/untried/neg/constrs.scala b/tests/untried/neg/constrs.scala
new file mode 100644
index 000000000..016df098f
--- /dev/null
+++ b/tests/untried/neg/constrs.scala
@@ -0,0 +1,19 @@
+object test {
+
+ abstract class Test(x: Int) {
+ type T;
+ val u = x;
+ def this(y: Int)(z: Int)(t: this.T) = { this(this.u + y + z); Console.println(x) }
+ }
+
+ class Foo(x: Int) {
+ def this() = this("abc")
+ def this(x: String) = this(1)
+ def this(x: Boolean) = this(x)
+ }
+
+ class Bar[a](x: a) {
+ def this() = this(1)
+ }
+
+}