Skip to content

Commit 34bfc22

Browse files
committed
Cache quetes with type splices an type patterns
1 parent 8c65097 commit 34bfc22

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ object PickledQuotes {
204204
new TreeTraverser {
205205
def traverse(tree: Tree)(using Context): Unit =
206206
tree match
207-
case _: DefTree => cacheable = false
207+
case _: DefTree =>
208+
if !tree.symbol.hasAnnotation(defn.QuotedRuntime_SplicedTypeAnnot)
209+
&& !tree.symbol.hasAnnotation(defn.QuotedRuntimePatterns_patternTypeAnnot)
210+
then
211+
cacheable = false
208212
case _ =>
209213
traverseChildren(tree)
210214
}.traverse(tree)

0 commit comments

Comments
 (0)