Skip to content

Commit

Permalink
Don't search for implicit conversions to NoType
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Jan 29, 2024
1 parent 1716bcd commit 526af20
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ object Types extends TypeUtils {
case tp: LambdaType => tp.resultType.unusableForInference || tp.paramInfos.exists(_.unusableForInference)
case WildcardType(optBounds) => optBounds.unusableForInference
case CapturingType(parent, refs) => parent.unusableForInference || refs.elems.exists(_.unusableForInference)
case _: ErrorType => true
case NoType | _: ErrorType => true
case _ => false
catch case ex: Throwable => handleRecursive("unusableForInference", show, ex)

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]

0 comments on commit 526af20

Please sign in to comment.