Skip to content

Commit c7ababf

Browse files
committed
Fix interpreted type quotes
1 parent ced25db commit c7ababf

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

compiler/src/dotty/tools/dotc/interpreter/Interpreter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class Interpreter(implicit ctx: Context) {
6969

7070
tree match {
7171
case Quoted(quotedTree) =>
72-
if (tree.isTerm) new scala.quoted.Exprs.TreeExpr(quotedTree)
72+
if (quotedTree.isTerm) new scala.quoted.Exprs.TreeExpr(quotedTree)
7373
else new scala.quoted.Types.TreeType(quotedTree)
7474

7575
case Literal(Constant(c)) => c.asInstanceOf[Object]
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: Unit = ~impl('[Int])
4+
def impl(t: Type[Int]): Expr[Unit] = ()
5+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
object Test {
2+
Macro.ff
3+
}

0 commit comments

Comments
 (0)