From 4f33c87ec520c1e9ccb1d3e1ec9c6e956adf3d25 Mon Sep 17 00:00:00 2001 From: Tom Grigg Date: Thu, 22 Oct 2020 13:41:13 -0700 Subject: [PATCH] Add regression test for #6384 Fixed by 18ce5d2 in #6467 --- tests/pos/i6384.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/pos/i6384.scala diff --git a/tests/pos/i6384.scala b/tests/pos/i6384.scala new file mode 100644 index 000000000000..9758712cf090 --- /dev/null +++ b/tests/pos/i6384.scala @@ -0,0 +1,15 @@ +trait Tc1[A] +trait Tc2[A] + +class X +object X { + implicit def catchAll[F[_]]: F[X] = ??? +} + +type ManualLambda[a] = Tc1[a] & Tc2[a] + +object app extends App { + implicitly[Tc1[X]] //ok + implicitly[ManualLambda[X]] // ok + implicitly[Tc1[X] & Tc2[X]] // no implicit argument of type Tc1[X] & Tc2[X] was found for parameter ev of method implicitly in object DottyPredef +}