Skip to content

Commit 927ae4e

Browse files
committed
Check if unpickled tree has inline nodes
1 parent da0c249 commit 927ae4e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

compiler/src/dotty/tools/dotc/CompilationUnit.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ package dotc
33

44
import util.SourceFile
55
import ast.{tpd, untpd}
6-
import tpd.{ Tree, TreeTraverser }
6+
import dotty.tools.dotc.ast.Trees
7+
import tpd.{Tree, TreeTraverser}
78
import typer.PrepareInlineable.InlineAccessors
89
import dotty.tools.dotc.core.Contexts.Context
910
import dotty.tools.dotc.core.SymDenotations.ClassDenotation
1011
import dotty.tools.dotc.core.Symbols._
1112
import dotty.tools.dotc.transform.SymUtils._
13+
import dotty.tools.dotc.typer.Inliner
1214

1315
class CompilationUnit(val source: SourceFile) {
1416

@@ -57,6 +59,11 @@ object CompilationUnit {
5759
def traverse(tree: Tree)(implicit ctx: Context): Unit = {
5860
if (tree.symbol.isQuote)
5961
containsQuotes = true
62+
tree match {
63+
case _: tpd.RefTree | _: Trees.GenericApply[_] if Inliner.isInlineable(tree) =>
64+
containsQuotes = true // May inline a quote
65+
case _ =>
66+
}
6067
traverseChildren(tree)
6168
}
6269
}

0 commit comments

Comments
 (0)