diff --git a/tests/pos/i12679.scala b/tests/pos/i12679.scala new file mode 100644 index 000000000000..fed62c72dd42 --- /dev/null +++ b/tests/pos/i12679.scala @@ -0,0 +1,9 @@ +// https://github.com/lampepfl/dotty/issues/12679 + +object Example: + def foo[F[_]](qux: String, quux: String = ""): F[Unit] = ??? + + def foo[F[_]](qux: Boolean): F[Unit] = ??? + + def example[F[_]](maybeQux: Option[String], bool: Boolean) = + maybeQux.fold(foo[F](bool))(foo[F](_))