diff options
author | Martin Odersky <odersky@gmail.com> | 2016-12-12 10:42:47 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-12-12 10:46:48 +0100 |
commit | 4c1bf42414b7f7ed99653fe841b032eb11864f2a (patch) | |
tree | 3ff1602e1463e2345c168cfdf77dfcc7101f53e7 /compiler/src/dotty/tools/dotc/typer | |
parent | 1c03d45b1649bb8307c09ebfd2bcb3b9efe50dad (diff) | |
download | dotty-4c1bf42414b7f7ed99653fe841b032eb11864f2a.tar.gz dotty-4c1bf42414b7f7ed99653fe841b032eb11864f2a.tar.bz2 dotty-4c1bf42414b7f7ed99653fe841b032eb11864f2a.zip |
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.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Applications.scala | 2 | ||||
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Inliner.scala | 2 | ||||
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Namer.scala | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index 11121e1f3..a3b4cb311 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -992,7 +992,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic => val nestedCtx = ctx.fresh.setExploreTyperState { - implicit val ctx: Context = nestedCtx + implicit val ctx = nestedCtx isAsSpecificValueType(tp1, constrained(tp2).resultType) } case _ => // (3b) diff --git a/compiler/src/dotty/tools/dotc/typer/Inliner.scala b/compiler/src/dotty/tools/dotc/typer/Inliner.scala index 3931fcaf4..09487570d 100644 --- a/compiler/src/dotty/tools/dotc/typer/Inliner.scala +++ b/compiler/src/dotty/tools/dotc/typer/Inliner.scala @@ -189,7 +189,7 @@ object Inliner { if (!ctx.isAfterTyper) { val inlineCtx = ctx sym.updateAnnotation(LazyBodyAnnotation { _ => - implicit val ctx: Context = inlineCtx + implicit val ctx = inlineCtx ctx.withNoError(treeExpr(ctx))(makeInlineable) }) } diff --git a/compiler/src/dotty/tools/dotc/typer/Namer.scala b/compiler/src/dotty/tools/dotc/typer/Namer.scala index e02e90df1..4ca9f9e10 100644 --- a/compiler/src/dotty/tools/dotc/typer/Namer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Namer.scala @@ -683,7 +683,7 @@ class Namer { typer: Typer => //println(i"completing type params of $sym in ${sym.owner}") nestedCtx = localContext(sym).setNewScope myTypeParams = { - implicit val ctx: Context = nestedCtx + implicit val ctx = nestedCtx val tparams = original.rhs match { case PolyTypeTree(tparams, _) => tparams case _ => Nil |