Skip to content

Commit f210ca1

Browse files
Apply suggestions from code review
Co-Authored-By: Fengyun Liu <liu@fengy.me>
1 parent e17fc86 commit f210ca1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,13 +836,13 @@ trait Checking {
836836
def isCaseObject(sym: Symbol): Boolean =
837837
// TODO add alias to Nil in scala package
838838
sym.is(Case) && sym.is(Module)
839-
def isisStaticEnumCase(sym: Symbol): Boolean =
839+
def isStaticEnumCase(sym: Symbol): Boolean =
840840
sym.is(Enum) && sym.is(JavaStatic) && sym.is(Case)
841841
val allow =
842842
ctx.erasedTypes ||
843843
ctx.inInlineMethod ||
844844
(tree.symbol.isStatic && isCaseObject(tree.symbol) || isCaseClassApply(tree.symbol)) ||
845-
isisStaticEnumCase(tree.symbol) ||
845+
isStaticEnumCase(tree.symbol) ||
846846
isCaseClassNew(tree.symbol)
847847

848848
if (!allow) ctx.error(em"$what must be a known value", tree.sourcePos)

0 commit comments

Comments
 (0)