Skip to content

Commit 2fc2aa2

Browse files
committed
Harden patch logic
1 parent 3763e6b commit 2fc2aa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3408,7 +3408,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
34083408
def isContextBoundParams = wtp.stripPoly match
34093409
case MethodType(EvidenceParamName(_) :: _) => true
34103410
case _ => false
3411-
if sourceVersion == `future-migration` && isContextBoundParams
3411+
if sourceVersion == `future-migration` && isContextBoundParams && pt.args.nonEmpty
34123412
then // Under future-migration, don't infer implicit arguments yet for parameters
34133413
// coming from context bounds. Issue a warning instead and offer a patch.
34143414
report.migrationWarning(

0 commit comments

Comments
 (0)