diff --git a/compiler/src/dotty/tools/dotc/core/Signature.scala b/compiler/src/dotty/tools/dotc/core/Signature.scala index d9b5dcca81e3..660040c9b7a4 100644 --- a/compiler/src/dotty/tools/dotc/core/Signature.scala +++ b/compiler/src/dotty/tools/dotc/core/Signature.scala @@ -50,7 +50,8 @@ case class Signature(paramsSig: List[ParamSig], resSig: TypeName) { /** Two names are consistent if they are the same or one of them is tpnme.Uninstantiated */ private def consistent(name1: ParamSig, name2: ParamSig) = - name1 == name2 || name1 == tpnme.Uninstantiated || name2 == tpnme.Uninstantiated + name1 == name2 || name1 == tpnme.Uninstantiated || name2 == tpnme.Uninstantiated || + name1 == tpnme.WILDCARD || name2 == tpnme.WILDCARD /** Does this signature coincide with that signature on their parameter parts? * This is the case if all parameter signatures are _consistent_, i.e. they are either diff --git a/tests/pos/i11481a.scala b/tests/pos/i11481a.scala new file mode 100644 index 000000000000..532bbd06136c --- /dev/null +++ b/tests/pos/i11481a.scala @@ -0,0 +1 @@ +case class Baz[F[_]](f: {def f(x: F[Int]): Object}) diff --git a/tests/pos/i11481b.scala b/tests/pos/i11481b.scala new file mode 100644 index 000000000000..c1ecf85be383 --- /dev/null +++ b/tests/pos/i11481b.scala @@ -0,0 +1 @@ +case class Baz[F[_], G[_]](f: [B] => F[B] => G[B])