Skip to content

Commit f07d9ca

Browse files
committed
Fix creation of importContext for accessibility checking
1 parent e8ea6e9 commit f07d9ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,9 @@ trait Checking {
830830
case _: ValDef | _: TypeDef => stat.symbol.is(Case)
831831
case _ => false
832832
}
833-
val cases = for (stat <- impl.body if isCase(stat)) yield untpd.Ident(stat.symbol.name)
833+
val cases =
834+
for (stat <- impl.body if isCase(stat))
835+
yield untpd.Ident(stat.symbol.name.toTermName)
834836
val caseImport: Import = Import(ref(cdef.symbol), cases)
835837
val caseCtx = enumCtx.importContext(caseImport, caseImport.symbol)
836838
for (stat <- impl.body) checkCaseOrDefault(stat, caseCtx)

0 commit comments

Comments
 (0)