Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ object SymDenotations {
c.ensureCompleted()
end completeChildrenIn

if is(Sealed) then
if is(Sealed) || isAllOf(JavaEnumTrait) then
if !is(ChildrenQueried) then
// Make sure all visible children are completed, so that
// they show up in Child annotations. A possible child is visible if it
Expand Down
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package dotty.tools.dotc
package dotty.tools
package dotc
package transform
package patmat

Expand Down
9 changes: 9 additions & 0 deletions tests/pos/i14807.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// scalac: -Werror
enum Foo:
case One(value: String)
case Two(value: Long, month: java.time.Month)

object Issue:
def doSomething(foo: Foo): String = foo match
case Foo.One(x) => s"1 $x"
case Foo.Two(x, y) => s"2 $x $y"