File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,21 @@ class ReifyQuotes extends MacroTransformWithImplicits {
74
74
75
75
override def phaseName : String = " reifyQuotes"
76
76
77
+ override def checkPostCondition (tree : Tree )(implicit ctx : Context ): Unit = {
78
+ if (ctx.owner.ownersIterator.exists(_.isTransparentMethod)) {
79
+ tree match {
80
+ case tree : Select if tree.symbol == defn.QuotedExpr_~ =>
81
+ assert(Splicer .canBeSpliced(tree.qualifier))
82
+ case _ =>
83
+ }
84
+ } else {
85
+ assert(tree.symbol != defn.QuotedExpr_~ )
86
+ // assert(tree.symbol != defn.QuotedType_~) // TODO widen ~ type references at stage 0?
87
+ assert(tree.symbol != defn.QuotedExpr_apply )
88
+ assert(tree.symbol != defn.QuotedType_apply )
89
+ }
90
+ }
91
+
77
92
override def run (implicit ctx : Context ): Unit =
78
93
if (ctx.compilationUnit.containsQuotesOrSplices) super .run
79
94
You can’t perform that action at this time.
0 commit comments