Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Implicits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ trait Implicits:
if (argument.isEmpty) i"missing implicit parameter of type $pt after typer at phase ${ctx.phase.phaseName}"
else i"type error: ${argument.tpe} does not conform to $pt${err.whyNoMatchStr(argument.tpe, pt)}")

val usableForInference = !pt.unusableForInference
val usableForInference = pt.exists && !pt.unusableForInference
&& (argument.isEmpty || !argument.tpe.unusableForInference)

val result0 = if usableForInference then
Expand Down
15 changes: 15 additions & 0 deletions tests/neg/i19320.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//> using scala "3.3.1"
//> using dep org.http4s::http4s-ember-client:1.0.0-M40
//> using dep org.http4s::http4s-ember-server:1.0.0-M40
//> using dep org.http4s::http4s-dsl:1.0.0-M40

//import cats.effect.*
//import cats.implicits.*

class Concurrent[F[_]]

class Test[F[_]: Concurren]: // error
def hello = ???

object Test:
def apply[F[_]: Concurrent] = new Test[F]