-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:documentationarea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcitype:enhancementstat:unassignedThis issue or PR is not assigned to anyone, but should beThis issue or PR is not assigned to anyone, but should be
Description
Compiler version
Latest dotty on Scastie (3.2.0-RC1)
Minimized code
enum MyEnum {
case class Foo(n: Int)
case Constructor(field: Foo)
}
Output
enum MyEnum {
case class Foo(n: Int)
case Constructor(field: Foo)
// Not found: type Foo ^^^
}
Expectation
If definitions within enums cannot be referred to, they should be forbidden. The error message in this case should be something along the lines of:
enum MyEnum {
case class Foo(n: Int)
// case class definitions in enum not allowed.
case Constructor(field: Foo)
}
Metadata
Metadata
Assignees
Labels
area:documentationarea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcitype:enhancementstat:unassignedThis issue or PR is not assigned to anyone, but should beThis issue or PR is not assigned to anyone, but should be