Skip to content

Commit

Permalink
Fix Scala 2 library TASTy synthetic unapply optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Nov 23, 2023
1 parent 637ed88 commit 8ad0121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
./project/scripts/sbt ";sjsSandbox/run ;sjsSandbox/test ;sjsJUnitTests/test ;set sjsJUnitTests/scalaJSLinkerConfig ~= switchToESModules ;sjsJUnitTests/test ;sjsCompilerTests/test"
- name: Test with Scala 2 library TASTy (fast)
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
run: ./project/scripts/sbt ";set ThisBuild/Build.useScala2LibraryTasty := true ;scala3-bootstrapped/testCompilation i5; scala3-bootstrapped/testCompilation tests/run/typelevel-peano.scala; scala3-bootstrapped/testOnly dotty.tools.backend.jvm.DottyBytecodeTests" # only test a subset of test to avoid doubling the CI execution time

test_scala2_library_tasty:
runs-on: [self-hosted, Linux]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ object PatternMatcher {
lazy val caseAccessors = caseClass.caseAccessors

def isSyntheticScala2Unapply(sym: Symbol) =
sym.isAllOf(SyntheticCase) && sym.owner.is(Scala2x)
sym.is(Synthetic) && sym.owner.is(Scala2x)

def tupleApp(i: Int, receiver: Tree) = // manually inlining the call to NonEmptyTuple#apply, because it's an inline method
ref(defn.RuntimeTuplesModule)
Expand Down

0 comments on commit 8ad0121

Please sign in to comment.