Skip to content

Leaking reach capabilities for class parameters #23303

Closed
@Linyxus

Description

@Linyxus

Compiler version

main

Minimized code

import language.experimental.captureChecking
class Runner(ops: List[() => Unit]):
  def execute: Unit = ops.foreach(f => f())

Output

It compiles.

Expectation

It should not.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions