File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,19 @@ 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
+ val inTransparentMethod = ctx.owner.ownersIterator.exists(_.isTransparentMethod)
79
+ tree match {
80
+ case tree : RefTree if ! inTransparentMethod =>
81
+ assert(! tree.symbol.isQuote)
82
+ // assert(!tree.symbol.isSplice) // TODO widen ~ type references at stage 0?
83
+ assert(tree.symbol != defn.QuotedExpr_~ )
84
+ case tree : Select if tree.symbol == defn.QuotedExpr_~ =>
85
+ assert(Splicer .canBeSpliced(tree.qualifier))
86
+ case _ =>
87
+ }
88
+ }
89
+
77
90
override def run (implicit ctx : Context ): Unit =
78
91
if (ctx.compilationUnit.containsQuotesOrSplices) super .run
79
92
You can’t perform that action at this time.
0 commit comments