You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ambiguous overload. The overloaded alternatives of method f with types
[X<:Base](ins: X)(usingx$2: T[X]):String
[X<:Base](ins: X):String
both match arguments (A)
f(A())
where there is only one ambigious case; K inheriting from Finite[F] and having a type parameter with the TestElements type class. In general I expect the NotGiven construction to work here.
fails on the same case, though with a different error:
no implicit argument of typeTestElements[Set[Boolean]] was found.
which is misleading, because it does find the implicit when K does not inherit from Finite.
This error can finally be resolved by inlining that match too:
transparentinlinedefextractTest[K[F], F](k: K[F]) =inline k matchcasekv: Finite[F] => fromFinite[F](using kv)
case _ => summonInline[TestElements[F]]
Compiler version
3.0.2
Minimized code
Output
Expectation
To work similar to the regular case:
I first suspected this to be an issue with the implicit being optional in that case, but the following doesn't work either:
The text was updated successfully, but these errors were encountered: