Skip to content

Match Types arguments with bounds do not conform the bounds #6697

Closed
@zraffer

Description

@zraffer

minimized code

sealed trait Off
case class Of[sup, sub <: sup] extends Off
type Sup[O <: Off] = O match { case Of[sup, sub] => sup } // error here!
type Sub[O <: Off] = O match { case Of[sup, sub] => sub } // error here!
type Copy[O <: Off] = Of[Sup[O], Sub[O]]

emits type errors about variables sup, sub do not conform the bounds

expectation

no errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions