File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,7 @@ class Interpreter(implicit ctx: Context) {
6363 * If some error is encountered while interpreting a ctx.error is emitted and a StopInterpretation is thrown.
6464 */
6565 private def interpretTreeImpl (tree : Tree , env : Env ): Object = {
66- ctx.debuglog(
67- s """ Interpreting:
68- | ${tree.show}
69- | $env
70- """ .stripMargin)
66+ // println(s"Interpreting:\n${tree.show}\n$env\n")
7167
7268 implicit val pos : Position = tree.pos
7369
@@ -114,6 +110,9 @@ class Interpreter(implicit ctx: Context) {
114110 val env2 = bindings.foldLeft(env)((acc, x) => interpretStat(x, acc))
115111 interpretTreeImpl(expansion, env2)
116112
113+ case TypeApply (fn, _) =>
114+ interpretTreeImpl(fn, env)
115+
117116 case Typed (expr, _) =>
118117 interpretTreeImpl(expr, env)
119118
Original file line number Diff line number Diff line change @@ -16,10 +16,7 @@ object Splicer {
1616 */
1717 def splice (tree : Tree )(implicit ctx : Context ): Tree = tree match {
1818 case Quoted (quotedTree) => quotedTree
19- case tree : RefTree => reflectiveSplice(tree)
20- case tree : Apply => reflectiveSplice(tree)
21- case tree : Inlined => reflectiveSplice(tree)
22- case tree : Block => reflectiveSplice(tree)
19+ case _ => reflectiveSplice(tree)
2320 }
2421
2522 /** Splice the Tree for a Quoted expression which is constructed via a reflective call to the given method */
Original file line number Diff line number Diff line change 1+ import scala .quoted ._
2+ object Macro {
3+ inline def ff [T ](implicit t : Type [T ]): Int = ~ impl[T ]
4+ def impl [T ]: Expr [Int ] = 4
5+ }
Original file line number Diff line number Diff line change 1+ object Test {
2+ Macro .ff[Int ]
3+ }
You can’t perform that action at this time.
0 commit comments