File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,18 @@ class ReifyQuotes extends MacroTransformWithImplicits {
7474
7575 override def phaseName : String = " reifyQuotes"
7676
77+ override def checkPostCondition (tree : Tree )(implicit ctx : Context ): Unit = {
78+ tree match {
79+ case tree : RefTree if ! ctx.inTransparentMethod =>
80+ assert(! tree.symbol.isQuote)
81+ // assert(!tree.symbol.isSplice) // TODO widen ~ type references at stage 0?
82+ assert(tree.symbol != defn.QuotedExpr_~ )
83+ case tree : Select if tree.symbol == defn.QuotedExpr_~ =>
84+ assert(Splicer .canBeSpliced(tree.qualifier))
85+ case _ =>
86+ }
87+ }
88+
7789 override def run (implicit ctx : Context ): Unit =
7890 if (ctx.compilationUnit.containsQuotesOrSplices) super .run
7991
You can’t perform that action at this time.
0 commit comments