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/core/TypeComparer.scala | |
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/core/TypeComparer.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/TypeComparer.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala index f8c0cdac9..743220f55 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala @@ -16,7 +16,7 @@ import scala.util.control.NonFatal /** Provides methods to compare types. */ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling { - implicit val ctx: Context = initctx + implicit val ctx = initctx val state = ctx.typerState import state.constraint @@ -156,7 +156,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling { private def firstTry(tp1: Type, tp2: Type): Boolean = tp2 match { case tp2: NamedType => def compareNamed(tp1: Type, tp2: NamedType): Boolean = { - implicit val ctx: Context = this.ctx + implicit val ctx = this.ctx tp2.info match { case info2: TypeAlias => isSubType(tp1, info2.alias) case _ => tp1 match { |