Skip to content

Dependent function types crash the capture checker #26649

Description

@Linyxus

Compiler version

main

Minimized code

import language.experimental.separationChecking
import caps.*
class Ref extends Mutable:
  update def set(x: Int): Unit = ()
  def get: Int = 0
def seq(f: () => Unit, g: () ->{any, f} Unit): Unit = ()
@main def test() =
  val a = Ref()
  seq(() => a.set(10), () => println(s"Let me check again: ${a.get}"))

Output

It crashed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions