Skip to content

Commit 62ea061

Browse files
committed
Add result caps for type-parameter-only defs
1 parent c35fbe4 commit 62ea061

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/cc/Capability.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import annotation.constructorOnly
2121
import ast.tpd
2222
import printing.{Printer, Showable}
2323
import printing.Texts.Text
24-
import reporting.Message
24+
import reporting.{Message, trace}
2525
import NameOps.isImpureFunction
2626
import annotation.internal.sharable
2727

@@ -881,6 +881,8 @@ object Capabilities:
881881
m(tp) match
882882
case tp1: ExprType if sym.is(Method, butNot = Accessor) =>
883883
tp1.derivedExprType(toResult(tp1.resType, tp1, fail))
884+
case tp1: PolyType if !tp1.resType.isInstanceOf[MethodicType] =>
885+
tp1.derivedLambdaType(resType = toResult(tp1.resType, tp1, fail))
884886
case tp1 => tp1
885887
end toResultInResults
886888

0 commit comments

Comments
 (0)