diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-03-30 17:33:06 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-03-31 11:54:54 +0200 |
commit | f9db9097d0cf314d675669d80f8d5eb8d20f0710 (patch) | |
tree | a1cba9297cd2d8de3d7f868e5794dcbfcda9098e /compiler/src/dotty/tools/dotc/core/Decorators.scala | |
parent | f75caad00256db52bbd3310f245e51d23c2a76cc (diff) | |
download | dotty-f9db9097d0cf314d675669d80f8d5eb8d20f0710.tar.gz dotty-f9db9097d0cf314d675669d80f8d5eb8d20f0710.tar.bz2 dotty-f9db9097d0cf314d675669d80f8d5eb8d20f0710.zip |
Fix #2151: don't die for wrong number of typeargs applied
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) |