Skip to content

Commit 190a982

Browse files
Merge pull request #14286 from dotty-staging/add-null-by-name-inline-test
Add regression test
2 parents 16b962e + 129ca7d commit 190a982

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import scala.quoted.*
2+
3+
inline def foo(x: => Any): Unit =
4+
${ impl('x) }
5+
6+
private def impl(x: Expr[Any])(using Quotes) : Expr[Unit] = {
7+
'{
8+
val a = $x
9+
}
10+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
def test = foo(null)

0 commit comments

Comments
 (0)