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.
2 parents d44a189 + 764a905 commit 29e4b05Copy full SHA for 29e4b05
compiler/src/dotty/tools/dotc/transform/TreeMapWithStages.scala
@@ -139,6 +139,11 @@ abstract class TreeMapWithStages(@constructorOnly ictx: Context) extends TreeMap
139
case (_:Import | _:Export) =>
140
tree
141
142
+ case _: Template =>
143
+ val last = enteredSyms
144
+ tree.symbol.owner.info.decls.foreach(markSymbol)
145
+ mapOverTree(last)
146
+
147
case _ =>
148
markDef(tree)
149
mapOverTree(enteredSyms)
tests/pos-macros/i14373.scala
@@ -0,0 +1,10 @@
1
+import scala.quoted._
2
+trait Foo
3
+object Foo {
4
+ def apply_impl(using Quotes): Expr[Any] = '{
5
+ new Foo {
6
+ private def foo: String = ???
7
+ def bar: Any = ${ '{ foo }; ??? }
8
+ }
9
10
+}
0 commit comments