Skip to content

Commit 795db6c

Browse files
Merge pull request #7901 from dotty-staging/fix-#7897
Add regression test for #7897
2 parents 2ed4df9 + 965eff6 commit 795db6c

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)