File tree 1 file changed +3
-2
lines changed
compiler/src/dotty/tools/dotc/typer 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1271,8 +1271,9 @@ class Typer extends Namer
1271
1271
if (ctx.mode.is(Mode .Pattern )) {
1272
1272
// Associate a pattern-bound type symbol with the wildcard.
1273
1273
// The bounds of the type symbol can be constrained when comparing a pattern type
1274
- // with an expected type in typedTyped. The type symbol is eliminated once
1275
- // the enclosing pattern has been typechecked; see `indexPattern` in `typedCase`.
1274
+ // with an expected type in typedTyped. The type symbol and the defining Bind node
1275
+ // are eliminated once the enclosing pattern has been typechecked; see `indexPattern`
1276
+ // in `typedCase`.
1276
1277
val wildcardSym = ctx.newPatternBoundSymbol(tpnme.WILDCARD , tree1.tpe, tree.pos)
1277
1278
untpd.Bind (tpnme.WILDCARD , tree1).withType(wildcardSym.typeRef)
1278
1279
}
You can’t perform that action at this time.
0 commit comments