Skip to content

Commit ab3ac74

Browse files
committed
Remove code dealing with @SplicedType
1 parent c084187 commit ab3ac74

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

compiler/src/dotty/tools/dotc/staging/HealType.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ class HealType(pos: SrcPos)(using Context) extends TypeMap {
4343

4444
private def healTypeRef(tp: TypeRef): Type =
4545
tp.prefix match
46-
case NoPrefix if tp.typeSymbol.hasAnnotation(defn.QuotedRuntime_SplicedTypeAnnot) =>
47-
tp
4846
case prefix: TermRef if tp.symbol.isTypeSplice =>
4947
checkNotWildcardSplice(tp)
5048
if level == 0 then tp else getTagRef(prefix)
@@ -58,7 +56,7 @@ class HealType(pos: SrcPos)(using Context) extends TypeMap {
5856

5957
private object NonSpliceAlias:
6058
def unapply(tp: TypeRef)(using Context): Option[Type] = tp.underlying match
61-
case TypeAlias(alias) if !tp.symbol.isTypeSplice && !tp.typeSymbol.hasAnnotation(defn.QuotedRuntime_SplicedTypeAnnot) => Some(alias)
59+
case TypeAlias(alias) if !tp.symbol.isTypeSplice => Some(alias)
6260
case _ => None
6361

6462
private def checkNotWildcardSplice(splice: TypeRef): Unit =

compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ class PickleQuotes extends MacroTransform {
8383
assert(Inlines.inInlineMethod)
8484
case tree: Splice =>
8585
assert(Inlines.inInlineMethod)
86-
case _ : TypeDef if !Inlines.inInlineMethod =>
87-
assert(!tree.symbol.hasAnnotation(defn.QuotedRuntime_SplicedTypeAnnot),
88-
s"${tree.symbol} should have been removed by PickledQuotes because it has a @quoteTypeTag")
8986
case _ =>
9087

9188
override def run(using Context): Unit =

compiler/src/dotty/tools/dotc/transform/Splicing.scala

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,6 @@ class Splicing extends MacroTransform:
117117
val newSplicedCode1 = splicer.transformSplice(tree.expr, tree.tpe, holeIdx)(using spliceContext)
118118
val newSplicedCode2 = Level0QuoteTransformer.transform(newSplicedCode1)(using spliceContext)
119119
newSplicedCode2
120-
case tree: TypeDef if tree.symbol.hasAnnotation(defn.QuotedRuntime_SplicedTypeAnnot) =>
121-
val tp @ TypeRef(qual: TermRef, _) = tree.rhs.tpe.hiBound: @unchecked
122-
quotedDefs += tree.symbol
123-
val hole = typeHoles.get(qual) match
124-
case Some (hole) => cpy.Hole(hole)(content = EmptyTree)
125-
case None =>
126-
val holeIdx = numHoles
127-
numHoles += 1
128-
val hole = tpd.Hole(false, holeIdx, Nil, ref(qual), TypeTree(tp))
129-
typeHoles.put(qual, hole)
130-
hole
131-
cpy.TypeDef(tree)(rhs = hole)
132120
case _: Template =>
133121
for sym <- tree.symbol.owner.info.decls do
134122
quotedDefs += sym

0 commit comments

Comments
 (0)