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