aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Implicits.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-18 14:07:39 +0100
committerMartin Odersky <odersky@gmail.com>2017-02-18 14:07:39 +0100
commit08f4c3e72485bf01d37f9ea84b2ae8bfea27d049 (patch)
tree3dd5b2905f8cb8fab8ea69a1c1eee82fcb3cb74c /compiler/src/dotty/tools/dotc/typer/Implicits.scala
parent9f26d32db25824f75e5c5b2c2314352c42b074c1 (diff)
downloaddotty-08f4c3e72485bf01d37f9ea84b2ae8bfea27d049.tar.gz
dotty-08f4c3e72485bf01d37f9ea84b2ae8bfea27d049.tar.bz2
dotty-08f4c3e72485bf01d37f9ea84b2ae8bfea27d049.zip
Polishing
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Implicits.scala7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Implicits.scala b/compiler/src/dotty/tools/dotc/typer/Implicits.scala
index 82eb260a4..627ce6f77 100644
--- a/compiler/src/dotty/tools/dotc/typer/Implicits.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Implicits.scala
@@ -549,11 +549,8 @@ trait Implicits { self: Typer =>
*/
def lazyImplicitCtx(lazyImplicit: Symbol): Context = {
val lctx = ctx.fresh
- ctx.property(DelayedImplicit) match {
- case Some(delayedRef) =>
- lctx.setImplicits(new ContextualImplicits(delayedRef :: Nil, ctx.implicits)(ctx))
- case None =>
- }
+ for (delayedRef <- ctx.property(DelayedImplicit))
+ lctx.setImplicits(new ContextualImplicits(delayedRef :: Nil, ctx.implicits)(ctx))
lctx.setProperty(DelayedImplicit, lazyImplicit.termRef)
}