Skip to content

Commit 232c563

Browse files
committed
WIP stged type with macro
1 parent c7ababf commit 232c563

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/pos/i4023c/Macro_1.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import scala.quoted._
2+
object Macro {
3+
inline def ff[T](x: T): T = ~impl('(x), '[T])
4+
def impl[T](x: Expr[T], t: Type[T]): Expr[T] = '{ (~x): ~t }
5+
}

tests/pos/i4023c/Test_2.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
object Test {
2+
Macro.ff(3)
3+
4+
def f[T](x: T) = {
5+
Macro.ff(x)
6+
}
7+
}

0 commit comments

Comments
 (0)