diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index f1793071b0fa..f22b52754299 100644 --- a/compiler/src/dotty/tools/dotc/ast/Desugar.scala +++ b/compiler/src/dotty/tools/dotc/ast/Desugar.scala @@ -613,7 +613,7 @@ object desugar { } } - if (isCaseClass) + if isCaseClass then val (enumMeths, enumScaffolding) = enumCaseMeths (copyMeths ::: enumMeths ::: productElemMeths, enumScaffolding) else (Nil, Nil) @@ -1002,7 +1002,7 @@ object desugar { */ def patDef(pdef: PatDef)(using Context): Tree = flatTree { val PatDef(mods, pats, tpt, rhs) = pdef - if (mods.isEnumCase) + if mods.isEnumCase then def expand(id: Ident, definesLookups: Boolean) = expandSimpleEnumCase(id.name.asTermName, mods, definesLookups, Span(id.span.start, id.span.end, id.span.start)) diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index 3df4d89eaf7b..93453c22226b 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -3023,7 +3023,7 @@ class Typer extends Namer if (matchingApply(wtp, pt)) if needsTupledDual(wtp, pt) then adapt(tree, pt.tupledDual, locked) else tree - else if (wtp.isContextualMethod) + else if wtp.isContextualMethod then def isContextBoundParams = wtp.stripPoly match case MethodType(EvidenceParamName(_) :: _) => true case _ => false