diff --git a/compiler/src/dotty/tools/dotc/core/Denotations.scala b/compiler/src/dotty/tools/dotc/core/Denotations.scala index a5e1f64d58cb..7d2af9f4bf8f 100644 --- a/compiler/src/dotty/tools/dotc/core/Denotations.scala +++ b/compiler/src/dotty/tools/dotc/core/Denotations.scala @@ -513,7 +513,7 @@ object Denotations { * otherwise generate new synthetic names. */ private def mergeParamNames(tp1: LambdaType, tp2: LambdaType): List[tp1.ThisName] = - (for ((name1, name2, idx) <- tp1.paramNames.lazyZip(tp2.paramNames).lazyZip(tp1.paramNames.indices)) + (for case (name1, name2, idx) <- tp1.paramNames.lazyZip(tp2.paramNames).lazyZip(tp1.paramNames.indices) yield if (name1 == name2) name1 else tp1.companion.syntheticParamName(idx)).toList /** Normally, `tp1 & tp2`, with extra care taken to return `tp1` or `tp2` directly if that's diff --git a/compiler/src/dotty/tools/dotc/core/Symbols.scala b/compiler/src/dotty/tools/dotc/core/Symbols.scala index b19c8cae3105..9df013c8fb6e 100644 --- a/compiler/src/dotty/tools/dotc/core/Symbols.scala +++ b/compiler/src/dotty/tools/dotc/core/Symbols.scala @@ -754,7 +754,7 @@ object Symbols { } val tparams = tparamBuf.toList val bounds = boundsFn(trefBuf.toList) - for (tparam, bound) <- tparams.lazyZip(bounds) do + for case (tparam, bound) <- tparams.lazyZip(bounds) do tparam.info = bound tparams } diff --git a/compiler/src/dotty/tools/dotc/transform/Splicer.scala b/compiler/src/dotty/tools/dotc/transform/Splicer.scala index 1306aa87ae11..335dcb583913 100644 --- a/compiler/src/dotty/tools/dotc/transform/Splicer.scala +++ b/compiler/src/dotty/tools/dotc/transform/Splicer.scala @@ -307,7 +307,7 @@ object Splicer { def interpretArgsGroup(args: List[Tree], argTypes: List[Type]): List[Object] = assert(args.size == argTypes.size) val view = - for (arg, info) <- args.lazyZip(argTypes) yield + for case (arg, info) <- args.lazyZip(argTypes) yield info match case _: ExprType => () => interpretTree(arg) // by-name argument case _ => interpretTree(arg) // by-value argument diff --git a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala index b14ea658b405..b62014ea79ac 100644 --- a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala +++ b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala @@ -140,7 +140,7 @@ object RefChecks { if parentCls.is(Trait) then val params = parentCls.asClass.paramGetters val args = termArgss(app).flatten - for (param, arg) <- params.lazyZip(args) do + for case (param, arg) <- params.lazyZip(args) do if !param.is(Private) then // its type can be narrowed through intersection -> a check is needed val paramType = cls.thisType.memberInfo(param) if !(arg.tpe <:< paramType) then