Skip to content

Commit 071a0d2

Browse files
authored
chore: add regression test for #23225 (#24451)
Fixed in #23769. Closes #23225.
1 parent 5ccea40 commit 071a0d2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/pos/i23225.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import language.experimental.captureChecking
2+
3+
class A
4+
5+
def run(f: PartialFunction[A, A]^): A = f(A())
6+
7+
class File extends caps.SharedCapability:
8+
def read() = ()
9+
10+
def main() =
11+
val file = File()
12+
13+
run:
14+
case a =>
15+
file.read()
16+
a

0 commit comments

Comments
 (0)