Skip to content

Commit 36eeba1

Browse files
committed
Fix inline patterns not reducing
1 parent 513e45e commit 36eeba1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/inlines/InlineReducer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class InlineReducer(inliner: Inliner)(using Context):
329329
val paramCls = paramType.classSymbol
330330
if (paramCls.is(Case) && unapp.symbol.is(Synthetic) && scrut <:< paramType) {
331331
val caseAccessors =
332-
if (paramCls.is(Scala2x)) paramCls.caseAccessors.filter(_.is(Method))
332+
if (paramCls.is(Scala2x, butNot = Scala2Tasty)) paramCls.caseAccessors.filter(_.is(Method))
333333
else paramCls.asClass.paramAccessors
334334
val selectors =
335335
for (accessor <- caseAccessors)

0 commit comments

Comments
 (0)