Skip to content

Commit 3ba9821

Browse files
committed
Optimization: Don't keep FunProtos in wildcard approximations
FunProtos are uncached, so they should be approximated in cached implicit computations.
1 parent 6c32e0b commit 3ba9821

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,8 @@ object ProtoTypes {
660660
tp.derivedViewProto(
661661
wildApprox(tp.argType, theMap, seen),
662662
wildApprox(tp.resultType, theMap, seen))
663+
case tp: FunProto =>
664+
WildcardType
663665
case _: ThisType | _: BoundType => // default case, inlined for speed
664666
tp
665667
case _ =>

0 commit comments

Comments
 (0)