Reproduction steps
Scala version: 2.13.17
package com.example
trait Thing[F[_]]
object Repro {
def foo[F[_]](i: Int)(implicit F: Thing[F]): F[Unit] = ???
def bar[F[_] : Thing](i: Int): F[Unit] = foo(i) // <- warning here
}
[warn] .../Repro.scala:...:44: a type was inferred to be kind-polymorphic `Nothing` to conform to `F[_]`
[warn] Applicable -Wconf / @nowarn filters for this warning: msg=<part of the message>, cat=lint-infer-any, site=com.example.Repro.bar
[warn] def bar[F[_] : Thing](i: Int): F[Unit] = foo(i)
[warn] ^
Problem
I don't see a reason for this warning, but in case there is a good reason, I would definitely like to understand it.
Note: if I do foo[F](i) instead of foo(i), the warning disappears.
Note, that this is probably the same warning as reported here: https://contributors.scala-lang.org/t/scala-2-13-17-release-planning/6994/20