File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,14 @@ package dotc
33
44import util .SourceFile
55import ast .{tpd , untpd }
6- import tpd .{ Tree , TreeTraverser }
6+ import dotty .tools .dotc .ast .Trees
7+ import tpd .{Tree , TreeTraverser }
78import typer .PrepareInlineable .InlineAccessors
89import dotty .tools .dotc .core .Contexts .Context
910import dotty .tools .dotc .core .SymDenotations .ClassDenotation
1011import dotty .tools .dotc .core .Symbols ._
1112import dotty .tools .dotc .transform .SymUtils ._
13+ import dotty .tools .dotc .typer .Inliner
1214
1315class 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 }
You can’t perform that action at this time.
0 commit comments