Skip to content

Commit 791c75a

Browse files
committed
Reduced inline match symbols should not have Case
Those symbols are now normal ValDefs, thus should not have the Case flag.
1 parent 2b21ab4 commit 791c75a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
784784
* scrutinee as RHS and type that corresponds to RHS.
785785
*/
786786
def newTermBinding(sym: TermSymbol, rhs: Tree): Unit = {
787-
val copied = sym.copy(info = rhs.tpe.widenTermRefExpr, coord = sym.coord).asTerm
787+
val copied = sym.copy(info = rhs.tpe.widenTermRefExpr, coord = sym.coord, flags = sym.flags &~ Case).asTerm
788788
caseBindingMap += ((sym, ValDef(copied, constToLiteral(rhs)).withSpan(sym.span)))
789789
}
790790

0 commit comments

Comments
 (0)