Closed
Description
Not quite sure what's happening here, as I'm in the companion object, where I would expect stuff to behave like any other object.
Minimized code
enum Outer:
case Foo
object Outer:
trait Bar
case class Baz(bar: Bar)
Output
illegal reference to trait Bar from enum case
Expectation
It compiles, or at least gives a better error message.