We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39e466d commit 27e620fCopy full SHA for 27e620f
compiler/src/dotty/tools/dotc/transform/PostTyper.scala
@@ -203,7 +203,9 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
203
// might be a type constructor.
204
Checking.checkInstantiable(tree.tpe, nu.pos)
205
withNoCheckNews(nu :: Nil)(super.transform(tree))
206
- case _ =>
+ case meth =>
207
+ if (meth.symbol.name.eq(nme.QUOTE) && meth.symbol.owner.eq(defn.OpsPackageClass))
208
+ ctx.compilationUnit.containsQuotesOrSplices = true
209
super.transform(tree)
210
}
211
case tree: TypeApply =>
tests/pos/quote-no-splices.scala
@@ -0,0 +1,9 @@
1
+class Foo {
2
+ def foo: Unit = {
3
+ val expr ='{
4
+ val a = 3
5
+ println("foo")
6
+ 2 + a
7
+ }
8
9
+}
0 commit comments