Skip to content

Commit ef55ec0

Browse files
authored
Merge pull request #2108 from dotty-staging/fix-match-in-mergeCompanionDefs
Make pattern match exhaustive for mergeCompanionDefs.
2 parents ac51f06 + ed7aec8 commit ef55ec0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ class Namer { typer: Typer =>
537537
case Thicket(trees) => // companion object always expands to thickets
538538
trees.map {
539539
case mcls @ TypeDef(name, impl: Template) if valid(mcls) =>
540-
moduleClsDef.get(name) match {
540+
(moduleClsDef.get(name): @unchecked) match {
541541
case Some((stat1, mcls1@TypeDef(_, impl1: Template))) =>
542542
mergeIfSynthetic(stat, mcls, stat1, mcls1)
543543
mergeIfSynthetic(stat1, mcls1, stat, mcls)

0 commit comments

Comments
 (0)