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 {
74
74
75
75
override def phaseName : String = " reifyQuotes"
76
76
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
+
77
89
override def run (implicit ctx : Context ): Unit =
78
90
if (ctx.compilationUnit.containsQuotesOrSplices) super .run
79
91
You can’t perform that action at this time.
0 commit comments