Skip to content

Commit 2aa27de

Browse files
committed
Remove redundant case
1 parent 06a397e commit 2aa27de

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ class CrossStageSafety extends TreeMapWithStages {
102102
case tree: TypeDef if tree.symbol.is(Case) && level > 0 =>
103103
report.error(reporting.CaseClassInInlinedCode(tree), tree)
104104
super.transform(tree)
105-
case tree @ SplicedType(splicedTree) =>
106-
transformSpliceType(splicedTree, tree)
107105
case _ =>
108106
super.transform(tree)
109107
end transform
@@ -163,15 +161,6 @@ class CrossStageSafety extends TreeMapWithStages {
163161
untpd.cpy.Splice(splice)(body1).withType(tpe1)
164162
}
165163

166-
private def transformSpliceType(body: Tree, splice: Select)(using Context): Tree = {
167-
val body1 = transform(body)(using spliceContext)
168-
if ctx.reporter.hasErrors then
169-
splice
170-
else
171-
val tagRef = getQuoteTypeTags.getTagRef(splice.qualifier.tpe.asInstanceOf[TermRef])
172-
ref(tagRef).withSpan(splice.span)
173-
}
174-
175164
def transformTypeAnnotationSplices(tp: Type)(using Context) = new TypeMap {
176165
def apply(tp: Type): Type = tp match
177166
case tp: AnnotatedType =>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class HealType(pos: SrcPos)(using Context) extends TypeMap {
6363

6464
private def checkNotWildcardSplice(splice: TypeRef): Unit =
6565
splice.prefix.termSymbol.info.argInfos match
66-
case (tb: TypeBounds) :: _ => report.error(em"Cannot splice $splice because it is a wildcard type", pos)
66+
case (tb: TypeBounds) :: _ => report.error(em"Cannot stage $splice because it is an alias to a wildcard type", pos)
6767
case _ =>
6868

6969
/** Return the root of this path if it is a variable defined in a previous level.

0 commit comments

Comments
 (0)