diff --git a/tests/pos-custom-args/captures/i16224.scala b/tests/pos-custom-args/captures/i16224.scala new file mode 100644 index 000000000000..098b2a2a2903 --- /dev/null +++ b/tests/pos-custom-args/captures/i16224.scala @@ -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))) \ No newline at end of file