Skip to content

Commit

Permalink
Regression test for #16224 (#18067)
Browse files Browse the repository at this point in the history
Fixes #16224
  • Loading branch information
odersky authored Jun 27, 2023
2 parents 202eb59 + 3e3bec6 commit 484be60
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/pos-custom-args/captures/i16224.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import language.experimental.captureChecking
class Delta:
val value = 1

def f(v: Int)(using delta: Delta): Int =
v + delta.value

def run(): Unit =
val delta = Delta()
val x: Map[Char, Int] = Map(
'a' -> 0,
'b' -> 1
)
val y: Map[Char, Int] = x.map((k, v) => (k, f(v)(using delta)))

0 comments on commit 484be60

Please sign in to comment.