Skip to content

CC: Objects not properly tracked #24667

@bracevac

Description

@bracevac

Compiler version

3.8.1-RC1-bin-20251204-241f261-NIGHTLY

Minimized code

import language.experimental.captureChecking

def foo(c: AnyRef^, d: AnyRef^, e: AnyRef^): Unit =
  object O:
    val x = c
    def foo = println(d)

  val w: O.type = O // O should not be pure, but O^{c,d} 

Output

It's happily accepted by the capture checker.

Expectation

It shouldn't!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions