diff options
author | Martin Odersky <odersky@gmail.com> | 2016-12-05 10:34:58 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-12-17 18:34:27 +0100 |
commit | bcc80ad1343a3ed01bef55f494d9658cf02226c6 (patch) | |
tree | 5fb2feecdf0df524128c72d14a6402fd6c547291 /compiler/src/dotty/tools/dotc/ast/untpd.scala | |
parent | 0336785a2280a4a1e51e739e9aac3d5015f7c16f (diff) | |
download | dotty-bcc80ad1343a3ed01bef55f494d9658cf02226c6.tar.gz dotty-bcc80ad1343a3ed01bef55f494d9658cf02226c6.tar.bz2 dotty-bcc80ad1343a3ed01bef55f494d9658cf02226c6.zip |
Create implicit closures to math expected implicit functions
When the expected type is an implicit function, create an
implicit closure to match it.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/ast/untpd.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/ast/untpd.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/ast/untpd.scala b/compiler/src/dotty/tools/dotc/ast/untpd.scala index 9707770d5..77755da81 100644 --- a/compiler/src/dotty/tools/dotc/ast/untpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/untpd.scala @@ -55,7 +55,9 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo { } /** An implicit function type */ - class ImplicitFunction(args: List[Tree], body: Tree) extends Function(args, body) + class ImplicitFunction(args: List[Tree], body: Tree) extends Function(args, body) { + override def toString = s"ImplicitFunction($args, $body" + } /** A function created from a wildcard expression * @param placeHolderParams a list of definitions of synthetic parameters @@ -274,8 +276,6 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo { // ------ Additional creation methods for untyped only ----------------- - // def TypeTree(tpe: Type): TypeTree = TypeTree().withType(tpe) todo: move to untpd/tpd - /** new pre.C[Ts](args1)...(args_n) * ==> * (new pre.C).<init>[Ts](args1)...(args_n) |