Skip to content

Multistatement if enforce then #9960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/ast/Desugar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ object desugar {
}
}

if (isCaseClass)
if isCaseClass then
val (enumMeths, enumScaffolding) = enumCaseMeths
(copyMeths ::: enumMeths ::: productElemMeths, enumScaffolding)
else (Nil, Nil)
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Typer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down