@@ -178,6 +178,11 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
178178 }
179179 }
180180
181+ private def handleInlineCall (sym : Symbol )(implicit ctx : Context ): Unit = {
182+ if (sym.is(Inline ))
183+ ctx.compilationUnit.containsQuotesOrSplices = true
184+ }
185+
181186 private object dropInlines extends TreeMap {
182187 override def transform (tree : Tree )(implicit ctx : Context ): Tree = tree match {
183188 case Inlined (call, _, _) =>
@@ -189,12 +194,14 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
189194 override def transform (tree : Tree )(implicit ctx : Context ): Tree =
190195 try tree match {
191196 case tree : Ident if ! tree.isType =>
197+ handleInlineCall(tree.symbol)
192198 handleMeta(tree.symbol)
193199 tree.tpe match {
194200 case tpe : ThisType => This (tpe.cls).withPos(tree.pos)
195201 case _ => tree
196202 }
197203 case tree @ Select (qual, name) =>
204+ handleInlineCall(tree.symbol)
198205 handleMeta(tree.symbol)
199206 if (name.isTypeName) {
200207 Checking .checkRealizable(qual.tpe, qual.pos.focus)
@@ -236,19 +243,6 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
236243 case _ =>
237244 super .transform(tree1)
238245 }
239- case Inlined (call, bindings, expansion) if ! call.isEmpty =>
240- // Leave only a call trace consisting of
241- // - a reference to the top-level class from which the call was inlined,
242- // - the call's position
243- // in the call field of an Inlined node.
244- // The trace has enough info to completely reconstruct positions.
245- // The minimization is done for two reasons:
246- // 1. To save space (calls might contain large inline arguments, which would otherwise
247- // be duplicated
248- // 2. To enable correct pickling (calls can share symbols with the inlined code, which
249- // would trigger an assertion when pickling).
250- val callTrace = Ident (call.symbol.topLevelClass.typeRef).withPos(call.pos)
251- cpy.Inlined (tree)(callTrace, transformSub(bindings), transform(expansion)(inlineContext(call)))
252246 case tree : Template =>
253247 withNoCheckNews(tree.parents.flatMap(newPart)) {
254248 val templ1 = paramFwd.forwardParamAccessors(tree)
0 commit comments