Skip to content

Commit e7db5f0

Browse files
committed
Use isQuote
1 parent d30e5b8 commit e7db5f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import util.SourceFile
66
import ast.{tpd, untpd}
77
import dotty.tools.dotc.ast.tpd.{ Tree, TreeTraverser }
88
import dotty.tools.dotc.core.Contexts.Context
9-
import dotty.tools.dotc.core.StdNames._
109
import dotty.tools.dotc.core.SymDenotations.ClassDenotation
1110
import dotty.tools.dotc.core.Symbols._
11+
import dotty.tools.dotc.transform.SymUtils._
1212

1313
class CompilationUnit(val source: SourceFile) {
1414

@@ -48,7 +48,7 @@ object CompilationUnit {
4848
private class Force extends TreeTraverser {
4949
var containsQuotes = false
5050
def traverse(tree: Tree)(implicit ctx: Context): Unit = {
51-
if (tree.symbol.name.eq(nme.QUOTE) && tree.symbol.owner.eq(defn.OpsPackageClass))
51+
if (tree.symbol.isQuote)
5252
containsQuotes = true
5353
traverseChildren(tree)
5454
}

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
204204
Checking.checkInstantiable(tree.tpe, nu.pos)
205205
withNoCheckNews(nu :: Nil)(super.transform(tree))
206206
case meth =>
207-
if (meth.symbol.name.eq(nme.QUOTE) && meth.symbol.owner.eq(defn.OpsPackageClass))
207+
if (meth.symbol.isQuote)
208208
ctx.compilationUnit.containsQuotesOrSplices = true
209209
super.transform(tree)
210210
}

0 commit comments

Comments
 (0)