diff options
author | Martin Odersky <odersky@gmail.com> | 2015-10-30 13:59:11 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-10-30 13:59:11 +0100 |
commit | 9fbb9c9c9b6050183dd71b8541a63fc6ebf9e2a6 (patch) | |
tree | 9d231aa585850e6815a4048fba19637794db7d59 /src/dotty/tools/dotc/ast/Desugar.scala | |
parent | 2a4d7bc68dde060458cb3692cc272968f096c7d4 (diff) | |
download | dotty-9fbb9c9c9b6050183dd71b8541a63fc6ebf9e2a6.tar.gz dotty-9fbb9c9c9b6050183dd71b8541a63fc6ebf9e2a6.tar.bz2 dotty-9fbb9c9c9b6050183dd71b8541a63fc6ebf9e2a6.zip |
Revert nullary function patch
Nullary functions are handled by scalac, and dotty should do the same.
Diffstat (limited to 'src/dotty/tools/dotc/ast/Desugar.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/Desugar.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala index 51b7e3a1f..1ef883bf2 100644 --- a/src/dotty/tools/dotc/ast/Desugar.scala +++ b/src/dotty/tools/dotc/ast/Desugar.scala @@ -562,12 +562,12 @@ object desugar { * ==> * x$1 => x$1 match { cases } * - * If `nparams` > 1, expand instead to + * If `nparams` != 1, expand instead to * * (x$1, ..., x$n) => (x$0, ..., x${n-1}) match { cases } */ def makeCaseLambda(cases: List[CaseDef], nparams: Int = 1)(implicit ctx: Context) = { - val params = (1 to (nparams min 1)).toList.map(makeSyntheticParameter(_)) + val params = (1 to nparams).toList.map(makeSyntheticParameter(_)) val selector = makeTuple(params.map(p => Ident(p.name))) Function(params, Match(selector, cases)) } |