Skip to content

No bounds checking inside Match Types #24313

@hamzaremmal

Description

@hamzaremmal

Compiler version

d20dd28

Minimized code

type S[N <: Int]

type Foo[Xs] = Xs match
  case _ => S[String]

Output

Compiles

Expectation

Clearly, I cannot create an S[String] since String <: Int is false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions