aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/new/t2660.scala25
-rw-r--r--tests/pending/pos/tuplePatDef.scala4
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/new/t2660.scala b/tests/new/t2660.scala
new file mode 100644
index 000000000..94a40f740
--- /dev/null
+++ b/tests/new/t2660.scala
@@ -0,0 +1,25 @@
+package hoho
+
+class G
+
+class H extends G
+
+class A[T](x: T) {
+
+ def this(y: G, z: T) = {
+ this(z)
+ print(1)
+ }
+
+ def this(z: H, h: T) = {
+ this(h)
+ print(2)
+ }
+}
+
+object T {
+ def main(args: Array[String]): Unit = {
+ implicit def g2h(g: G): H = new H
+ new A[Int](new H, 23)
+ }
+}
diff --git a/tests/pending/pos/tuplePatDef.scala b/tests/pending/pos/tuplePatDef.scala
new file mode 100644
index 000000000..978052991
--- /dev/null
+++ b/tests/pending/pos/tuplePatDef.scala
@@ -0,0 +1,4 @@
+
+object Test {
+ val (x,y): (String, M) = null
+}