Skip to content

Local fresh caps are ignored in classes #23823

@Linyxus

Description

@Linyxus
trait IO:
  def f(): Unit

case class BoxIO[+T <: IO^](value: T) extends IO:
  def f(): Unit = value.f()

def test(io: IO^): IO =
  val b: BoxIO[IO^] = BoxIO(io)
  val a: IO = b // leak
  a

Originally posted by @noti0na1 in #23746

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