Skip to content

Commit bc77790

Browse files
committed
wip
1 parent 08b4ae4 commit bc77790

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,7 +2160,6 @@ class Typer extends Namer
21602160

21612161
/** Translate ${ t: Type[T] }` into type `t.splice` while tracking the quotation level in the context */
21622162
def typedTypSplice(tree: untpd.TypSplice, pt: Type)(implicit ctx: Context): Tree = track("typedTypSplice") {
2163-
// TODO factor out comon code with typedSplice
21642163
ctx.compilationUnit.needsStaging = true
21652164
checkSpliceOutsideQuote(tree)
21662165
tree.expr match {
@@ -2178,9 +2177,9 @@ class Typer extends Namer
21782177
val name = expr match {
21792178
case Ident(name) => ("$" + name).toTypeName
21802179
case Typed(Ident(name), _) => ("$" + name).toTypeName
2181-
case _ => "$".toTypeName
2180+
case Bind(name, _) => ("$" + name).toTypeName
2181+
case _ => NameKinds.UniqueName.fresh("$".toTypeName)
21822182
}
2183-
21842183
val typeSym = ctx.newSymbol(spliceOwner(ctx), name, EmptyFlags, TypeBounds.empty, NoSymbol, expr.span)
21852184
typeSym.addAnnotation(Annotation(New(ref(defn.InternalQuoted_patternBindHoleAnnot.typeRef)).withSpan(expr.span)))
21862185
val pat = typedPattern(expr, defn.QuotedTypeType.appliedTo(typeSym.typeRef))(

0 commit comments

Comments
 (0)