From 896d2ef14dbfcbb4cdccd54c64948c9ab52b88f7 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 18 Dec 2016 18:08:46 +0100 Subject: [PATCH] Fix-#1824 Logic fix in desugar An operation was performed quadratically before. --- compiler/src/dotty/tools/dotc/ast/Desugar.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index db78cfffb335..13ddff08c283 100644 --- a/compiler/src/dotty/tools/dotc/ast/Desugar.scala +++ b/compiler/src/dotty/tools/dotc/ast/Desugar.scala @@ -150,8 +150,7 @@ object desugar { val epbuf = new ListBuffer[ValDef] def desugarContextBounds(rhs: Tree): Tree = rhs match { case ContextBounds(tbounds, cxbounds) => - for (cxbound <- cxbounds) - epbuf ++= makeImplicitParameters(cxbounds, isPrimaryConstructor) + epbuf ++= makeImplicitParameters(cxbounds, isPrimaryConstructor) tbounds case PolyTypeTree(tparams, body) => cpy.PolyTypeTree(rhs)(tparams, desugarContextBounds(body))