Skip to content

Commit 524ee92

Browse files
committed
Handle enum name
1 parent 37f2267 commit 524ee92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3875,7 +3875,10 @@ object Parsers {
38753875
then
38763876
report.warning(AmbiguousTemplateName(md), md.namePos)
38773877
md match
3878-
case md @ TypeDef(name, impl: Template) if impl.body.isEmpty && !md.isBackquoted => checkName(name)
3878+
case md @ TypeDef(name, impl: Template) if !md.isBackquoted =>
3879+
val checking = impl.body.isEmpty || false
3880+
if checking then
3881+
checkName(name)
38793882
case md @ ModuleDef(name, impl) if impl.body.isEmpty && !md.isBackquoted => checkName(name)
38803883
case _ =>
38813884
checkName()

0 commit comments

Comments
 (0)