We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d0312f commit 044d29dCopy full SHA for 044d29d
src/dotty/tools/dotc/typer/Implicits.scala
@@ -284,10 +284,13 @@ trait ImplicitRunInfo { self: RunInfo =>
284
override implicit protected val ctx: Context = liftingCtx
285
override def stopAtStatic = true
286
def apply(tp: Type) = tp match {
287
+ case tp: TypeRef if tp.symbol.isLambdaTrait =>
288
+ defn.AnyType
289
case tp: TypeRef if tp.symbol.isAbstractOrAliasType =>
290
val pre = tp.prefix
291
def joinClass(tp: Type, cls: ClassSymbol) =
- AndType.make(tp, cls.typeRef.asSeenFrom(pre, cls.owner))
292
+ if (cls.isLambdaTrait) tp
293
+ else AndType.make(tp, cls.typeRef.asSeenFrom(pre, cls.owner))
294
val lead = if (tp.prefix eq NoPrefix) defn.AnyType else apply(tp.prefix)
295
(lead /: tp.classSymbols)(joinClass)
296
case tp: TypeVar =>
0 commit comments