From 4c1bf42414b7f7ed99653fe841b032eb11864f2a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 12 Dec 2016 10:42:47 +0100 Subject: Drop explicit types for local implicit vals Drop explicit types for local implicit vals of type Context and Position. Exercises the functionality and shortens the code. --- compiler/src/dotty/tools/dotc/ast/Trees.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/ast') diff --git a/compiler/src/dotty/tools/dotc/ast/Trees.scala b/compiler/src/dotty/tools/dotc/ast/Trees.scala index c4b2b2122..20273eb85 100644 --- a/compiler/src/dotty/tools/dotc/ast/Trees.scala +++ b/compiler/src/dotty/tools/dotc/ast/Trees.scala @@ -1224,7 +1224,7 @@ object Trees { case AppliedTypeTree(tpt, args) => this(this(x, tpt), args) case PolyTypeTree(tparams, body) => - implicit val ctx: Context = localCtx + implicit val ctx = localCtx this(this(x, tparams), body) case ByNameTypeTree(result) => this(x, result) @@ -1237,13 +1237,13 @@ object Trees { case UnApply(fun, implicits, patterns) => this(this(this(x, fun), implicits), patterns) case tree @ ValDef(name, tpt, _) => - implicit val ctx: Context = localCtx + implicit val ctx = localCtx this(this(x, tpt), tree.rhs) case tree @ DefDef(name, tparams, vparamss, tpt, _) => - implicit val ctx: Context = localCtx + implicit val ctx = localCtx this(this((this(x, tparams) /: vparamss)(apply), tpt), tree.rhs) case TypeDef(name, rhs) => - implicit val ctx: Context = localCtx + implicit val ctx = localCtx this(x, rhs) case tree @ Template(constr, parents, self, _) => this(this(this(this(x, constr), parents), self), tree.body) -- cgit v1.2.3