Skip to content

Commit 965eff6

Browse files
committed
Add regression test for #7897
1 parent 2ed4df9 commit 965eff6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/run-staging/i7897.scala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import scala.quoted._, staging._
2+
3+
given Toolbox = Toolbox.make(getClass.getClassLoader)
4+
5+
val f: Array[Int] => Int = run {
6+
val stagedSum: Expr[Array[Int] => Int] = '{ (arr: Array[Int]) => 6 }
7+
println(stagedSum.show)
8+
stagedSum
9+
}
10+
11+
@main
12+
def Test = {
13+
f.apply(Array(1, 2, 3)) // Returns 6
14+
}

0 commit comments

Comments
 (0)