Skip to content

Missing unchecked warning #18364

Closed
Closed
@dwijnand

Description

@dwijnand

Compiler version

3.2.1

Minimized code

case class Wrapper[A](value: A)
enum Color:
  case Red, Green

def test_wrong(x: Wrapper[Color]): Option[Wrapper[Color.Red.type]] =
  x match
    case x: Wrapper[Color.Red.type] => Some(x)
    case _                          => None

Output

No warnings

Expectation

Unchecked warnings.

Notes

This is rereporting #16451, which we reverted the fix for in #18303.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions