aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/tpd.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-18 12:42:57 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-18 12:42:57 +0100
commit766379f578ab2ae05b2a94fc9c51e8a47e25b9ff (patch)
tree39e881bdd9a4f94019214755640d3d316eb7e5b5 /src/dotty/tools/dotc/ast/tpd.scala
parent15d8a2e9804fe55c9261e195088da55c0eaa6803 (diff)
downloaddotty-766379f578ab2ae05b2a94fc9c51e8a47e25b9ff.tar.gz
dotty-766379f578ab2ae05b2a94fc9c51e8a47e25b9ff.tar.bz2
dotty-766379f578ab2ae05b2a94fc9c51e8a47e25b9ff.zip
Allowing curried closures.
Diffstat (limited to 'src/dotty/tools/dotc/ast/tpd.scala')
-rw-r--r--src/dotty/tools/dotc/ast/tpd.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/ast/tpd.scala b/src/dotty/tools/dotc/ast/tpd.scala
index b66b4d017..195797b2b 100644
--- a/src/dotty/tools/dotc/ast/tpd.scala
+++ b/src/dotty/tools/dotc/ast/tpd.scala
@@ -123,8 +123,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
* where the closure's type is the target type of the expression (FunctionN, unless
* otherwise specified).
*/
- def Closure(meth: TermSymbol, bodyFn: List[Tree] => Tree, targetType: Type = NoType)(implicit ctx: Context): Block = {
- val rhsFn: List[List[Tree]] => Tree = { case args :: Nil => bodyFn(args) }
+ def Closure(meth: TermSymbol, rhsFn: List[List[Tree]] => Tree, targetType: Type = NoType)(implicit ctx: Context): Block = {
val targetTpt = if (targetType.exists) TypeTree(targetType) else EmptyTree
Block(
DefDef(meth, rhsFn) :: Nil,