Skip to content

Commit 1395176

Browse files
hamzaremmalHarrisL2
authored andcommitted
chore: add regression test for scala#23225 (scala#24451)
Fixed in scala#23769. Closes scala#23225.
1 parent 75b2148 commit 1395176

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)