aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/badAuxConstr.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/neg/badAuxConstr.scala')
-rw-r--r--tests/neg/badAuxConstr.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/neg/badAuxConstr.scala b/tests/neg/badAuxConstr.scala
new file mode 100644
index 000000000..8984f2306
--- /dev/null
+++ b/tests/neg/badAuxConstr.scala
@@ -0,0 +1,11 @@
+class A[S, T](s: S, t: T) {
+ val z: T = ???
+}
+
+class B[X](x: X) extends A[X, X](x, x) {
+ def this() = this(z) // error: not found: z
+
+ val u: X = x
+ def this(x: Int) = this(u) // error: not found: u
+}
+