aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/t3346b.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/t3346b.scala')
-rw-r--r--tests/untried/neg/t3346b.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/untried/neg/t3346b.scala b/tests/untried/neg/t3346b.scala
new file mode 100644
index 000000000..f28ee8ba3
--- /dev/null
+++ b/tests/untried/neg/t3346b.scala
@@ -0,0 +1,15 @@
+import scala.language.implicitConversions
+
+trait T[X]
+trait U[X]
+trait TC[M[_]]
+
+object Test extends App {
+ def foo[M[_]: TC, A](ma: M[A]) = ()
+ implicit val TCofT: TC[T] = new TC[T] {}
+ implicit def any2T[A](a: A): T[A] = new T[A] {}
+ implicit def any2U[A](a: A): U[A] = new U[A] {}
+
+ val x = foo[T, Int](1)
+ val y = foo(1)
+}