diff options
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Decorators.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Decorators.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Decorators.scala b/compiler/src/dotty/tools/dotc/core/Decorators.scala index f8267072e..0e8ae196a 100644 --- a/compiler/src/dotty/tools/dotc/core/Decorators.scala +++ b/compiler/src/dotty/tools/dotc/core/Decorators.scala @@ -103,7 +103,7 @@ object Decorators { * as long as `xs`. */ def zipWithConserve[U](ys: List[U])(f: (T, U) => T): List[T] = - if (xs.isEmpty) xs + if (xs.isEmpty || ys.isEmpty) Nil else { val x1 = f(xs.head, ys.head) val xs1 = xs.tail.zipWithConserve(ys.tail)(f) |