We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16b962e + 129ca7d commit 190a982Copy full SHA for 190a982
tests/pos-macros/null-by-name/Macro_1.scala
@@ -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
+}
tests/pos-macros/null-by-name/Test_2.scala
@@ -0,0 +1 @@
+def test = foo(null)
0 commit comments