Skip to content

Commit

Permalink
Revert "workaround scala#14626"
Browse files Browse the repository at this point in the history
Martin's fix removes the need for this workaround

This reverts commit 36e0c29.
  • Loading branch information
griggt committed Apr 4, 2022
1 parent 4782f8d commit f3e2d3b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Denotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ object Denotations {
* otherwise generate new synthetic names.
*/
private def mergeParamNames(tp1: LambdaType, tp2: LambdaType): List[tp1.ThisName] =
(for case (name1, name2, idx) <- tp1.paramNames.lazyZip(tp2.paramNames).lazyZip(tp1.paramNames.indices)
(for ((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
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Symbols.scala
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ object Symbols {
}
val tparams = tparamBuf.toList
val bounds = boundsFn(trefBuf.toList)
for case (tparam, bound) <- tparams.lazyZip(bounds) do
for (tparam, bound) <- tparams.lazyZip(bounds) do
tparam.info = bound
tparams
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/Splicer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ object Splicer {
def interpretArgsGroup(args: List[Tree], argTypes: List[Type]): List[Object] =
assert(args.size == argTypes.size)
val view =
for case (arg, info) <- args.lazyZip(argTypes) yield
for (arg, info) <- args.lazyZip(argTypes) yield
info match
case _: ExprType => () => interpretTree(arg) // by-name argument
case _ => interpretTree(arg) // by-value argument
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/RefChecks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ object RefChecks {
if parentCls.is(Trait) then
val params = parentCls.asClass.paramGetters
val args = termArgss(app).flatten
for case (param, arg) <- params.lazyZip(args) do
for (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
Expand Down

0 comments on commit f3e2d3b

Please sign in to comment.