Skip to content

document that Symbol.children returns values for scala enum #13230

Closed
@scf37

Description

@scf37

Compiler version

3.0.1

Minimized code

enum E:
  case A, B

val repr = TypeRepr.of[E]
TypeRepr.of[E].classSymbol.get.children // List(val A, val B)
repr.classSymbol.get.children.map { smb => repr.memberType(smb).show } // List(E, E)

Expectation

Technically scala enum is not a sealed hierarchy since all elements are val, not classes and have the same type.

I suspect it is a feature so Symbol.children scaladoc need to include this case.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions