Skip to content

Commit 7a8c761

Browse files
committed
wip
1 parent 5834d3a commit 7a8c761

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,10 +2041,14 @@ class Typer extends Namer
20412041
ctx.error(i"Type must be fully defined.\nConsider annotating the splice using a type ascription:\n ($tree: XYZ).", tree.expr.sourcePos)
20422042
tree.withType(UnspecifiedErrorType)
20432043
} else {
2044-
val bindedType = defn.NothingType // FIXME need to create a new type
2044+
val bindingBounds = TypeBounds.apply(defn.NothingType, defn.AnyType)
2045+
val sym = ctx.newPatternBoundSymbol("ttt".toTypeName, bindingBounds, expr.span)
2046+
val bind = Bind(sym, untpd.Ident(nme.WILDCARD).withType(bindingBounds)).withSpan(expr.span)
2047+
2048+
val bindedType = bind // FIXME need to create a new type
20452049
def spliceOwner(ctx: Context): Symbol =
20462050
if (ctx.mode.is(Mode.QuotedPattern)) spliceOwner(ctx.outer) else ctx.owner
2047-
val pat = typedPattern(tree.expr, defn.QuotedTypeType.appliedTo(bindedType))(
2051+
val pat = typedPattern(tree.expr, defn.QuotedTypeType.appliedTo(sym.typeRef))(
20482052
spliceContext.retractMode(Mode.QuotedPattern).withOwner(spliceOwner(ctx)))
20492053
Splice(pat)
20502054
}

0 commit comments

Comments
 (0)