We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46f4f93 commit 788ae4eCopy full SHA for 788ae4e
compiler/src/dotty/tools/dotc/typer/Checking.scala
@@ -1207,7 +1207,7 @@ trait Checking {
1207
}
1208
case _ =>
1209
1210
- else if (stat.symbol.is(Module) && stat.symbol.linkedClass.is(Case))
+ else if (stat.symbol.is(Module) && stat.symbol.linkedClass.isAllOf(EnumCase))
1211
stat match {
1212
case TypeDef(_, impl: Template) =>
1213
for ((defaultGetter @
tests/pos/i11081.scala
@@ -2,4 +2,5 @@ enum Outer:
2
case Foo
3
object Outer:
4
trait Bar
5
- case class Baz(bar: Bar)
+ case class Baz(bar: Bar)
6
+ case class Bam(bar: Bar = new Bar() {})
0 commit comments