diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-29 18:34:28 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-29 18:34:28 +0100 |
commit | 3f39cd8e15c321cf6ac97a0137087f7c2d69ce60 (patch) | |
tree | 447b2de4b54892e8128ade1fe297fb7335adadf1 /src/dotty/tools/dotc | |
parent | 4e1880c535367892b97e7a111438cb0ce49998c0 (diff) | |
download | dotty-3f39cd8e15c321cf6ac97a0137087f7c2d69ce60.tar.gz dotty-3f39cd8e15c321cf6ac97a0137087f7c2d69ce60.tar.bz2 dotty-3f39cd8e15c321cf6ac97a0137087f7c2d69ce60.zip |
Avoiding an idiom which is not supported by dotty.
Normally, Predef.identity cannot be used as an expression with unknown expected type. You need a trailing `_`.
But when used as a default argument, Scala 2x allows it. I am not sure why it is allowed. In dotty it's disallowed everywhere, hence the fix.
Diffstat (limited to 'src/dotty/tools/dotc')
-rw-r--r-- | src/dotty/tools/dotc/ast/tpd.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/tpd.scala b/src/dotty/tools/dotc/ast/tpd.scala index 70016c0a6..2e6604bc2 100644 --- a/src/dotty/tools/dotc/ast/tpd.scala +++ b/src/dotty/tools/dotc/ast/tpd.scala @@ -429,7 +429,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { def tpes: List[Type] = xs map (_.tpe) } - class TreeMapper(val typeMap: TypeMap = IdentityTypeMap, val ownerMap: Symbol => Symbol = identity)(implicit ctx: Context) extends TreeTransformer { + class TreeMapper(val typeMap: TypeMap = IdentityTypeMap, val ownerMap: Symbol => Symbol = identity _)(implicit ctx: Context) extends TreeTransformer { override def transform(tree: tpd.Tree)(implicit ctx: Context): tpd.Tree = super.transform { tree.withType(typeMap(tree.tpe)) match { case bind: tpd.Bind => |