Skip to content

Missing "Reference to uninitialized value" warning in traits #12091

Open
@lrytz

Description

@lrytz

reproduction steps

scala> class C { val x = y; val y = 1 }
                         ^
       warning: Reference to uninitialized value y
class C

scala> trait T { val x = y; val y = 1 }
trait T

problem

The warning should also be emitted in the second example.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions