Skip to content

Commit 7904539

Browse files
committed
Multistatement if enforce then
1 parent 99548bd commit 7904539

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ object desugar {
613613
}
614614
}
615615

616-
if (isCaseClass)
616+
if isCaseClass then
617617
val (enumMeths, enumScaffolding) = enumCaseMeths
618618
(copyMeths ::: enumMeths ::: productElemMeths, enumScaffolding)
619619
else (Nil, Nil)
@@ -1002,7 +1002,7 @@ object desugar {
10021002
*/
10031003
def patDef(pdef: PatDef)(using Context): Tree = flatTree {
10041004
val PatDef(mods, pats, tpt, rhs) = pdef
1005-
if (mods.isEnumCase)
1005+
if mods.isEnumCase then
10061006
def expand(id: Ident, definesLookups: Boolean) =
10071007
expandSimpleEnumCase(id.name.asTermName, mods, definesLookups,
10081008
Span(id.span.start, id.span.end, id.span.start))

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3023,7 +3023,7 @@ class Typer extends Namer
30233023
if (matchingApply(wtp, pt))
30243024
if needsTupledDual(wtp, pt) then adapt(tree, pt.tupledDual, locked)
30253025
else tree
3026-
else if (wtp.isContextualMethod)
3026+
else if wtp.isContextualMethod then
30273027
def isContextBoundParams = wtp.stripPoly match
30283028
case MethodType(EvidenceParamName(_) :: _) => true
30293029
case _ => false

0 commit comments

Comments
 (0)