Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ object PickledQuotes {
val quotedType = typeHole(idx, reifiedArgs)
PickledQuotes.quotedTypeToTree(quotedType)
}
case tree: Select =>
// Retain selected members
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to see a bug fixed by deleting code, but I don't really understand what this code was there for in the first place 😅. What does retaining means here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not remember exactly. There was an issue where the selects lost their symbol and this was a workaround. We must have fixed the actual source of the issue in the meantime.

val qual = transform(tree.qualifier)
qual.select(tree.symbol).withSpan(tree.span)

case tree =>
if tree.isDef then
tree.symbol.annotations = tree.symbol.annotations.map {
Expand Down
3 changes: 3 additions & 0 deletions tests/pos-macros/i14180/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import scala.quoted._
def impl(using Quotes): Expr[Unit] =
'{ ([V] => (v: V) => println(v)).apply[Int](2) }
2 changes: 2 additions & 0 deletions tests/pos-macros/i14180/Test_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
inline def foo = ${ impl }
def example = foo