Skip to content

Commit e3843b0

Browse files
committed
Extend comment about @quoteTypeTag
1 parent 22364f3 commit e3843b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/core/quoted/PickledQuotes.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ object PickledQuotes {
8080
val unpickled = unpickle(tastyBytes, args, isType = true)(ctx.addMode(Mode.ReadPositions))
8181
val tpt = unpickled match {
8282
case Block(aliases, tpt) =>
83-
// `@quoteTypeTag type` aliasses are not required after unpickling
83+
// `@quoteTypeTag type` aliases are not required after unpickling.
84+
// Type definitions are placeholders for type holes in the pickled quote, at this point
85+
// those holes have been filled. As we already dealias al references to them in `dealiasTypeTags`
86+
// there is no need to keep their definitions in the tree. As artifacts of quote reification
87+
// they also do not have a meaningful position in the source.
8488
val aliases1 = aliases.filter(!_.symbol.hasAnnotation(defn.InternalQuoted_QuoteTypeTagAnnot))
8589
seq(aliases1, tpt)
8690
case tpt => tpt

0 commit comments

Comments
 (0)