File tree 2 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -384,8 +384,11 @@ object desugar {
384
384
case tdef @ untpd.TypeDef (name, _) => ! tdef.isBackquoted && name.isVarPattern
385
385
case _ => false
386
386
}
387
+ val untpdCaseTypeVariables = untpdTypeVariables.asInstanceOf [List [untpd.TypeDef ]].map {
388
+ tdef => tdef.withMods(tdef.mods | Case )
389
+ }
387
390
val pattern = if otherStats.isEmpty then expr else untpd.cpy.Block (tree)(otherStats, expr)
388
- (untpdTypeVariables. asInstanceOf [ List [untpd. TypeDef ]] , pattern)
391
+ (untpdCaseTypeVariables , pattern)
389
392
case _ =>
390
393
(Nil , tree)
391
394
Original file line number Diff line number Diff line change @@ -242,7 +242,6 @@ trait QuotesAndSplices {
242
242
val allTypeBindings = List .newBuilder[Bind ]
243
243
for tpVar <- typeTypeVariables do
244
244
val sym = tpVar.symbol
245
- sym.setFlag(Case )
246
245
allTypeBindings += Bind (sym, untpd.Ident (nme.WILDCARD ).withType(sym.info)).withSpan(tpVar.span)
247
246
248
247
val body1 = inContext(patternCtx) {
You can’t perform that action at this time.
0 commit comments