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.
1 parent 31aa6df commit f0efb27Copy full SHA for f0efb27
tests/pos-macros/captured-type/Macro_1.scala
@@ -0,0 +1,8 @@
1
+import scala.quoted.*
2
+
3
+inline def foo[U](u: U): U = ${ fooImpl[U]('u) }
4
5
+def fooImpl[U: Type](u: Expr[U])(using Quotes): Expr[U] = '{
6
+ def f[T](x: T): T = ${ identity('{ x: T }) }
7
+ f[U]($u)
8
+}
tests/pos-macros/captured-type/Test_2.scala
@@ -0,0 +1,3 @@
+def test =
+ foo(1)
+ // foo("abc")
0 commit comments