Skip to content

Commit 323b29a

Browse files
committed
Fix Scala 2 TASTy accessors in inline patterns reduction
1 parent 220a633 commit 323b29a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
./project/scripts/sbt ";sjsSandbox/run ;sjsSandbox/test ;sjsJUnitTests/test ;set sjsJUnitTests/scalaJSLinkerConfig ~= switchToESModules ;sjsJUnitTests/test ;sjsCompilerTests/test"
144144
145145
- name: Test with Scala 2 library TASTy
146-
run: ./project/scripts/sbt ";set ThisBuild/Build.useScala2LibraryTasty := true ;scala3-bootstrapped/testCompilation i5" # only test a subset of test to avoid doubling the CI execution time
146+
run: ./project/scripts/sbt ";set ThisBuild/Build.useScala2LibraryTasty := true ;scala3-bootstrapped/testCompilation i5; scala3-bootstrapped/testCompilation tests/run/typelevel-peano.scala" # only test a subset of test to avoid doubling the CI execution time
147147
shell: cmd
148148

149149
test_windows_fast:

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)