Skip to content

Commit 526af20

Browse files
committed
Don't search for implicit conversions to NoType
1 parent 1716bcd commit 526af20

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ object Types extends TypeUtils {
378378
case tp: LambdaType => tp.resultType.unusableForInference || tp.paramInfos.exists(_.unusableForInference)
379379
case WildcardType(optBounds) => optBounds.unusableForInference
380380
case CapturingType(parent, refs) => parent.unusableForInference || refs.elems.exists(_.unusableForInference)
381-
case _: ErrorType => true
381+
case NoType | _: ErrorType => true
382382
case _ => false
383383
catch case ex: Throwable => handleRecursive("unusableForInference", show, ex)
384384

tests/neg/i19320.scala

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//> using scala "3.3.1"
2+
//> using dep org.http4s::http4s-ember-client:1.0.0-M40
3+
//> using dep org.http4s::http4s-ember-server:1.0.0-M40
4+
//> using dep org.http4s::http4s-dsl:1.0.0-M40
5+
6+
//import cats.effect.*
7+
//import cats.implicits.*
8+
9+
class Concurrent[F[_]]
10+
11+
class Test[F[_]: Concurren]: // error
12+
def hello = ???
13+
14+
object Test:
15+
def apply[F[_]: Concurrent] = new Test[F]

0 commit comments

Comments
 (0)