- Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Compiler version
main
Minimized code
import language.experimental.captureChecking import caps.* def test1(): Unit = val t1: (x: () => Unit) -> (y: () ->{x} Unit) -> Unit = x => y => () // should ok, but errorOutput
5 | x => y => () // should ok, but error | ^^^^^^^^^^^^ | Found: (x: () => Unit) ->'s1 (y: () ->{x²} Unit) -> Unit | Required: (x²: () => Unit) -> (y: () ->{x²} Unit) -> Unit | | where: => refers to the universal root capability | x² is a reference to a value parameter | x² is a reference to a value parameter | | Note that capability x is not included in capture set {x}. | | longer explanation available when compiling with `-explain` 1 error foundExpectation
Should be ok.
It is probably related to #23700.