From e3aeed198717e6764f2a27b70a22a03b03a87a0b Mon Sep 17 00:00:00 2001 From: David Hua Date: Sun, 26 Mar 2023 01:23:43 -0400 Subject: [PATCH] Add test for cacheResult flag --- tests/init/pos/recursive.scala | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/init/pos/recursive.scala diff --git a/tests/init/pos/recursive.scala b/tests/init/pos/recursive.scala new file mode 100644 index 000000000000..74b658330e03 --- /dev/null +++ b/tests/init/pos/recursive.scala @@ -0,0 +1,9 @@ +class A { + def p(cb: Int => Int): Int = cb(0) + + val q: List[Int] = { + def f(x: Int): Int => Int = y => p(f(y)) + List(1, 2).map(f(3)) + } + val n: Int = 4 +} \ No newline at end of file