From e5618d29e37ad50bd1b8c591ed50db63a6d7bc79 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 2 Apr 2015 16:11:20 +0200 Subject: Simplify methods implemented in #436 --- src/dotty/tools/dotc/ast/Desugar.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/dotty/tools/dotc/ast/Desugar.scala') diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala index 961675fed..1dfa24291 100644 --- a/src/dotty/tools/dotc/ast/Desugar.scala +++ b/src/dotty/tools/dotc/ast/Desugar.scala @@ -361,11 +361,10 @@ object desugar { } companionDefs(parent, applyMeths ::: unapplyMeth :: defaultGetters) } - else { - if (defaultGetters.nonEmpty) + else if (defaultGetters.nonEmpty) companionDefs(anyRef, defaultGetters) - else Nil - } + else Nil + // For an implicit class C[Ts](p11: T11, ..., p1N: T1N) ... (pM1: TM1, .., pMN: TMN), the method // synthetic implicit C[Ts](p11: T11, ..., p1N: T1N) ... (pM1: TM1, ..., pMN: TMN): C[Ts] = -- cgit v1.2.3