Closed
Description
Compiler version
3.nightly (3.7.2-RC1-bin-20250520-baac46c-NIGHTLY)
Minimized code
import language.experimental.captureChecking
import caps.*
class A:
def a: A = this
class B extends A, Capability
def leak(b: B): A = b.a
Output
Run: scala compile --server=false -S 3.nightly Stest.scala
Compile success.
Expectation
Reject, as we treat B as impure, and it should fail on inheritance check (maybe by checkSelfAgainstParents
)